Thanks for all. I admit a preference for dealing in macros over altering data files when possible, making your last example closer to ideal (no criticism expressed or implied).
-
Login or Register
- Log in with
levelsof year, local(yrs) foreach y of local yrs { levelsof tfr if year==`y', local(t) local yrlab `yrlab' "`y', `y' <TFR=`t'>" }
su year, meanonly forval y = `r(min)'/`r(max)' { su tfr if year == `y', meanonly if r(N) > 0 { local yrlab "`y', `y' <TFR=`r(min)'>" } }
Comment