How do you make pie chart by combining two variables in stata?. For example, make pie charts by sex (male, female) and studies (yes, no).
-
Login or Register
- Log in with
. sysuse auto (1978 Automobile Data) . drop if rep78 ==. (5 observations deleted) . label define rep78 1 "Rep = 1" 2 "Rep = 2" 3 "Rep = 3" 4 "Rep = 4" 5 "Rep = 5" . label values rep78 rep78 . egen float for_rep = group(foreign rep78), label lname(mylabel) . graph pie, over(for_rep) plabel(_all percent, format("%2.1f") size(small)) title("Beware: No sure pie chart should be a good idea...") note("Told you: so little information with so much fuss!")
Comment