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
"Dudekula, Anwar" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Recoding continious variable
Date
Sat, 13 Jul 2013 22:57:20 +0000
Thank you very much for your time Nick and Chamara. It was quite helpful and worked using different ways recommended by both of you.
Thank you again.
Yours Sincerely,
Anwar
________________________________________
From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: Saturday, July 13, 2013 12:18 PM
To: [email protected]
Subject: Re: st: Recoding continious variable
. 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/
*
* 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/