Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: Optimizing recoding procedures


From   "David Radwin" <dradwin@mprinc.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Optimizing recoding procedures
Date   Tue, 11 Dec 2012 14:10:37 -0800 (PST)

It's not much of an improvement, but if a, b, c, and d all are all dummy
(0/1) variables:

replace x = 0 if a + b + c + d == 4

David
--
David Radwin
Senior Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> >> On Tue, Dec 11, 2012 at 6:00 PM, Thomas Lux <tholux2000@yahoo.de>
> wrote:
> >>> Thank you very much, Nick!
> >>>
> >>> The mentioned statement makes indeed no sense.
> >>>
> >>> The statement should be
> >>>
> >>>
> >>> replace x = 0 if a==1 & b==1 & c==1 & d==1 & d==1
> >>>
> >>> Is there a way to do this in a shorter way?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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