Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Continuous to categorical variable


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: Re: Continuous to categorical variable
Date   Sat, 19 Oct 2002 16:24:32 -0500

egen var1 = cut(0_RC), at(25 (5) 40) icodes

Scott


----- Original Message ----- 
From: "Nitin Jain" <[email protected]>
To: <[email protected]>
Sent: Saturday, October 19, 2002 3:52 PM
Subject: st: Continuous to categorical variable


> Hi,
> Question:
> How can a convert a continuous variable within my
> dataset, into categories?
> e.g. My variable 0_RC has the following values:
> 30,31,37,29,38
> I would like to convert 0_RC into a categorical
> variable with the categories: 
> 25-30: if value is between 25 and 30
> 30-35: if value is between 30 and 35
> 35-40: if value is between 35 and 40
> Thank you,
> Nitin
> 



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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