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
Constructing real rate of return variableDear Community, I am trying to construct a real rate of return on a bond of 2 years to maturity. Th…
drop observationsHello! I am new in STATA. Please help me with this issue I need to drop observations with "choice" …
IV estimation - panel data 2SLS and LIML model are giving me the same exact results, when i am trying to control for weak instruments.When i ran my panel IV estimation, using xtivreg2, I saw my instruments were very weak and thus trie…
How to identify if each ID has two unique values for a variableHello! I am somewhat new to Stata and have tried to find an answer to this on other threads but have…
Changing the Column Titles and adding notes using Outreg2I am trying to export a table of summary statistics using the following command: outreg2 using "res…
Subscribe to:
Post Comments (Atom)
0 Response to bar chart multiple global ifs
Post a Comment