Hello,
I created the two macros, shock and miss.
local shock "__31002 __31003 __31004 __31005a __31006a __31007 __31008 __31009 __31010 __31011 __31012a"
local miss "type time sev inc ass idio cop1 cop2 cop3 exp recov"
Now I want to use loops to automate the following tasks:
gen type_un =(__31002 == .a)
gen type_uncl = (__31002 == 90 | __31002 == .b)
gen type_miss = (__31002 ==.)
gen time_un = (__31003 ==.a)
gen time_uncl = (__31003 == 90 | __31003 ==.b)
gen time_miss = (__31003 ==.)
gen sev_un = (__31004 ==.a)
...and so on
How do I write such a loop?
Thank you very much,
Sarah
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/