Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: transforming observations


From   Mintewab Bezabih <Mintewab.Bezabih@economics.gu.se>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: transforming observations
Date   Tue, 21 Feb 2012 15:46:27 +0100

Dear statalisters, 

I need to transform observations in my dataset (3476 obervations by 40 variables) into categorical variables based on the following set of rules :

observation x=0 if temp<=0
observation x=1 if temp==30
observation x=x if temp>=31

As you could imagine it would take me ages to do that one by one. Is there a compact way of doing this?

Many thanks in advance
minti
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index