Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Joseph Kwan <JXK180@bham.ac.uk> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: Cannot generate a dummy variable using if command |
Date | Fri, 2 Aug 2013 18:05:09 +0000 |
I would like to generate a variable for people older than 25 years old, so I use gen old=1 if age>25 but then Stata returns with an old dummy variable with all 1 for all observations. I checked the syntax and I do not know what is wrong. Is Stata known to have faults like that? * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/