Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Recode and Label problem

From   daniel klein <>
Subject   Re: st: Recode and Label problem
Date   Wed, 17 Oct 2012 09:11:58 +0200

... please ignore the part I wrote on -replace- -- at least for this
case. Here 1 indicates a "yes", so substracting 1 from the original
variable will not work.

Note that there is no need to use -label drop-, as -label define- has
a -modify- (and -replace-) option that allow you to change exisitng
value labels.


I just wanted to point out a faster

replace <foo> = <foo> - 1 if !mi(<foo>)

will give the same binary indicator, but -replace- (or -generate-, if
you want a new variable) is much faster than -recode- (might not be a
problem in a simple do-file, though).
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index