I am trying to create a bar graph that shows the distribution in terms of frequency of different genders across age groups (age_cat). So, I would like to have within the bar graph the "total", "males" and females".
I initially attempted the following:
separate age_cat, by(gender)
graph bar (count) age_cat age_cat1 age_cat2 , over(age_cat)
graph bar (count) age_cat age_cat1 age_cat2 , over(age_cat)
age_cat may not be both target and by()
gen age_total= age_cat
graph bar (count) age_total age_cat1 age_cat2 , over(age_cat)
graph bar (count) age_total age_cat1 age_cat2 , over(age_cat)
0 Response to bar chart with multiple comparisons.
Post a Comment