Re: st: RE: Data management

Suryadipta asked:
b. Then I am trying to replace these id-s with
replace id=3 if id==1;
replace id=5 if id==2;
replace id=8 if id==3;
But the 3rd line of the command is replacing the first set
of id-s also. I would greatly appreciate if someone can
suggest how to take care of this.
*********************************
A couple of possibilities:
1. Just reverse the order in which you are giving the commands
2. Use the recode command, e.g.
recode id (1=3)(2=5)(3=8)
See -help recode-
[NOTE: Notre Dame's email server is acting up so I am trying gmail.
Hopefully I am not doing something horrible like sending html to the
list! ]
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW: http://www.nd.edu/~rwilliam
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/