Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: recode stata like?


From   Richard Williams <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: recode stata like?
Date   Wed, 09 Nov 2005 12:41:26 -0500

At 12:29 PM 11/9/2005, lars@climweb.de wrote:
Dear all,

I don't think it's Stata-like to replace an existing value without an explicit command. "recode" does that by default see:

. sysuse auto
(1978 Automobile Data)

. recode weight (1/1999 = 1) (1999/.=2)
(weight: 74 changes made)

I don't think this is a good idea, because it is often used by stata novices. I would suggest to change that.
I'm not sure what you mean. -recode- is an explicit command, as is -replace-. I suppose you could change -recode- to include a -replace- option. But at some point you just have to trust users to know what they are doing. If anything, I feel like Stata protects me a little too much sometimes, e.g. if I ruled the world there might just be a -gen- command, not -gen- and -replace-.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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/




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