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: global macro syntax for recoding missing values


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: global macro syntax for recoding missing values
Date   Tue, 9 Aug 2011 07:33:12 +0100

See http://www.stata.com/statalist/archive/2008-08/msg01258.html for
what a macro is and is not in Stata.

This question seems the wrong way round to me. Numeric missing is . in
Stata. Use -mvdecode- to convert from other codes used externally.
-mvdecode- accepts multiple codes, or you can apply it repeatedly, so
there should be no need for you to write anything yourself.

Nick

On Tue, Aug 9, 2011 at 7:24 AM, Rebecca Coates <r.coates@uq.edu.au> wrote:

> I am archiving a dataset that has used multiple different values for missing data and I need to standardise all 3 waves to one missing value. I have a very basic understanding of macros, but can't figure out how to write a macro that will basically recode "." | "99" | "-999"  == "999".
> Does anyone have any suggestions or know where I can look?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index