With all of these good ways to generate the dichotomous variable, I would question why you want to do this in the first place. You lose information, you may not know if this is the 'best' cutpoint, etc. You could also consider the response as a function of the continuous variable.
Tony
Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Tuesday, February 16, 2010 3:58 AM
To: [email protected]
Subject: st: AW:AW: an egen command
<>
" I am using egen to create new variables."
BTW, the call to -egen- would have looked something like this:
*************
egen byte var2 = cut(mpg), /*
*/ at(`r(min)' ,`r(mean)' ,`=r(max)+1') /*
*/ icodes
*************
HTH
Martin
*
* 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/
*
* 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/