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

RE: st: recode stata like?

From   "Nick Cox" <>
To   <>
Subject   RE: st: recode stata like?
Date   Wed, 9 Nov 2005 18:05:59 -0000

I agree with Richard and, although it 
may not seem like it, with Lars. 

It is standard Stata philosophy that
changing your data, even minutely, is 
a big deal, and you should not be 
able to do that without saying so 
quite explicitly. Nor can you 
abbreviate any commands that do that. 

But -recode- manifestly _is_ a 
command for changing data, and fits
this philosophy exactly. 

So Stata agrees with Lars. 


Richard Williams
> >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-.

*   For searches and help try:

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