Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: recoding sets of variables


From   David Kantor <kantor.d@att.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: recoding sets of variables
Date   Wed, 30 Jul 2008 10:13:27 -0400

Yes, you need a separate -recode- command for every distinct recoding pattern. Any variables that share a recoding pattern can be put together in one -recode- command.
This doesn't seem excessively complicated.
--David

At 09:40 AM 7/30/2008, Murali Kuchibhotla wrote:

Hello,
I am trying to recode the values for 5 different variables, each
according to a different rule, i.e,for the first variable I want to change the
missing values to 0, for the second variable the 2' to 4's, and so forth. Is
there an efficient way to do this in Stata? I have looked at the help for both
the recode and replace commands, and from what I can tell I would require
multiple lines of code(one for each variable) to accomplish this task.Can this
task be further simplified? Thanks.
*
*   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   |   What's new   |   Site index