Hello,
I am working on my masters thesis and am having some troubles visualizing the data as I would like. I have 15 variable cat_1 to cat_15 that are binary variables 0/1, and I would like to plot them on one single bar graph but only for when the value is 1, not 0. At the moment I have these 15 separate graphs:
graph bar (count) if cat_1 == 1, over(year)
graph bar (count) if cat_2 == 1, over(year)
graph bar (count) if cat_3 == 1, over(year)
graph bar (count) if cat_4 == 1, over(year)
graph bar (count) if cat_5 == 1, over(year)
graph bar (count) if cat_6 == 1, over(year)
graph bar (count) if cat_7 == 1, over(year)
graph bar (count) if cat_8 == 1, over(year)
graph bar (count) if cat_9 == 1, over(year)
graph bar (count) if cat_10 == 1, over(year)
graph bar (count) if cat_11 == 1, over(year)
graph bar (count) if cat_12 == 1, over(year)
graph bar (count) if cat_13 == 1, over(year)
graph bar (count) if cat_14 == 1, over(year)
graph bar (count) if cat_15 == 1, over(year)
Any tips as to how to get these onto the same plot?
Thanks
Related Posts with bar chart multiple global ifs
Propensity score matching problemI'm doing a propensity score matching estimation. The code is as follows, psmatch2 highMacroSubFirm …
Interaction vs. Sub-group AnalysisHi, I have a puzzling result that I cannot reconcile, so I am writing to seek some help. I have tri…
Firm vs Industry fixed effectsDear Statalists, I am struggling with choosing firm or industry fixed-effect for my regression with…
What is the best method / code of calculating respondents' ages?I have two variable: Q26 (month) and Q27 (year). Q26: What month were you born? The answer is 12 mon…
Heckman Error in First stageHi I run the Heckman two step selection model by using following stata code. I am using stata 15.1 v…
Subscribe to:
Post Comments (Atom)
0 Response to bar chart multiple global ifs
Post a Comment