Statalist


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

st: RE: recoding sets of variables


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: recoding sets of variables
Date   Wed, 30 Jul 2008 16:09:16 +0200

Well, -recode- does allow a varlist, but then the rules applied must match.
If that is not the case, you need five separate lines of recode statements
for your five vars. I cannot see that as a drawback, though...

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Murali
Kuchibhotla
Sent: Wednesday, July 30, 2008 3:41 PM
To: [email protected]
Subject: st: recoding sets of variables

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.


Murali Kuchibhotla



*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index