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
Loop to change MDE and N in pcpanel commandHi. I'm using the pc_simulate command to find a sample size that will give me a power of 80%. I want…
Adding a non-standard row to a summary tableHi there! I'm new to STATA and trying to create a table similar to the below. Specifically, I'm loo…
Counting the number of values (that are not missing values)Hello! I want to make a variable based on other variables. The value of the variable would be the n…
Clustering Standard ErrorI am working on finding the relationship between FDI inflow and military expenditure. I have panel d…
Nested or Non nested?I have the following two models. I want to know whether these two models can be considered nested or…
Subscribe to:
Post Comments (Atom)
0 Response to bar chart multiple global ifs
Post a Comment