Hello! I've been having some trouble finding a solution to the following: I'm using "catplot" (ssc) to create a bar graph. I am able to have the % of catvar2 broken down by each value of catvar1. However, in addition to the two values of catvar2, I'd like to also show a "total". This would be similar to using the "by(catvar1, total)" option, except that the three values (catvar1==1, catvar1==2, and catvar==1 | 2) would be next to each other instead of in separate panels.
As an example, suppose I make the following graph:
What I'd like is for there to be groups of *three* bars instead of just the two, with the third bar representing the total % of the sample at each value of headroom. Is this possible to do?
Many thanks in advance for your help!
~John
As an example, suppose I make the following graph:
Code:
ssc install catplot, replace sysuse auto.dta, clear catplot foreign headroom, /// percent(foreign) /// recast(bar) asyvars
Many thanks in advance for your help!
~John
Comment