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

Re: st: recoding sets of variables

From   Maarten buis <>
Subject   Re: st: recoding sets of variables
Date   Wed, 30 Jul 2008 15:13:47 +0100 (BST)

--- Murali Kuchibhotla <> 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

Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo!
*   For searches and help try:

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