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

exit


You may find more information in the book Speaking Stata Graphics

24 views0 comments

Recent Posts

See All