--- Murali Kuchibhotla <[email protected]> wrote:
> 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's 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?
No, and for good reason. Somehow you need to tell Stata how you want to
change your variables. I can imagine a way when you wanted to apply the
same rule to five different variables, but even that would probably not
be worth the effort.
-- Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
*
* 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/