[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: AW:AW: an egen command

From   "Lachenbruch, Peter" <>
To   "''" <>
Subject   st: RE: AW:AW: an egen command
Date   Tue, 16 Feb 2010 08:23:27 -0800

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.


Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001

-----Original Message-----
From: [] On Behalf Of Martin Weiss
Sent: Tuesday, February 16, 2010 3:58 AM
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


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index