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

Re: st: Transformations


From   chris wallace <c.wallace@qmul.ac.uk>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Transformations
Date   12 Feb 2004 15:18:59 +0000

On Thu, 2004-02-12 at 15:16, Michael Blasnik wrote:
> Instead of the egen eqany() command, a better (one line) approach would be
> to use the inlist function.
> 
> replace var1=1 if inlist(var2,1,3)

indeed.  much neater.

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