Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Cannot generate a dummy variable using if command
From
Joseph Kwan <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: Cannot generate a dummy variable using if command
Date
Fri, 2 Aug 2013 18:10:28 +0000
Just to add that I have some missing values for the observations for the age column ( and I want to generate a dummy for people older than 25) , is that causing the problem or it is just technical fault due to the product?
Thanks
________________________________________
From: [email protected] [[email protected]] on behalf of Joseph Kwan [[email protected]]
Sent: Friday, August 02, 2013 7:05 PM
To: [email protected]
Subject: st: Cannot generate a dummy variable using if command
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/
*
* 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/