Array
Code:
graph bar (percent), by(year) over(wbsat) over(white) title(SWB)
I am trying to make a graph that compares SWB (subjective well-being) between white and non-white people in a balanced panel dataset (0 is non-white 1 is white). It appears the graphs are showing the percent of the whole sample that responds with a 1,2,3..etc for each race, which is why the bars for the white group are all so short. I want each bar to show the fraction of respondents with a given SWB score relative to their own race, but I want them on the same graph. In other words, I want the graph to look like this, but I want the bar for a SWB of 5 in group 1 to show what percentage of white people answered 5. As it stands, that bar shows the percent of the whole sample that answered with 5 and was also white. Sorry for the long-winded explanation this is hard for me to explain in words.