Stacking some levels of a variable and not others

Below is a worked example:

The commands I used in a do-file are:

webuse union, clear
keep idcode year age
recode year (71 77=1) (88=2) (*=.), gen(which)
graph bar age, over(year) over(which) asyvars stack


You may find more information in the book Speaking Stata Graphics

19 views0 comments