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]
Re: st: Recoding continious variable
From
[email protected]
To
"[email protected]" <[email protected]>
Subject
Re: st: Recoding continious variable
Date
Sat, 13 Jul 2013 17:18:59 +0100
. gen newvar = cond(oldvar < 40, 1, cond(oldvar <= 60, 2, 3)) if oldvar < .
Pseudo code:
IF oldvar < 40 THEN 1
ELSE IF oldvar <= 60 THEN 2
ELSE 3
So long as oldvar < .
Nick
[email protected]
On 13 Jul 2013, at 15:14, Chamara Anuranga <[email protected]> wrote:
> please refer following webpage
>
> http://www.ats.ucla.edu/stat/stata/faq/cut.htm
>
> Thanks,
> Chamara
>
> On Sat, Jul 13, 2013 at 11:42 AM, Dudekula, Anwar <[email protected]> wrote:
>> Hi All,
>> I am trying to recode a continuous variable(age) to categories. If I have to group people into three categories < 40, 40-60, > 60 ; at the cutoff point like at 40 , how can we get accurate cut offs i.e., do we have any symbols equivalent to ( ] ( ] with this command
*
* 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/