Statalist


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

Re: st: How to label the value 999999999999


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: How to label the value 999999999999
Date   Wed, 08 Oct 2008 14:53:14 -0500

At 04:49 PM 10/7/2008, Friedrich Huebler wrote:
I work with data from a household survey. Several variables have the
value 999999999999 for "missing data", for example a variable with
data on the monthly rent paid. When I try to define a label for this
value I get an error message. What can I do? I would like to keep the
original data and do not want to replace 999999999999 by some other
value. The reason is that the codebook and other documentation all
refer to 999999999999.

. clear
. set obs 1
. gen double var = 999999999999
. lab def var 999999999999 "No data"
may not label 1.00000e+12
r(198);

Thanks,

Friedrich

I haven't followed this thread closely so perhaps others have already mentioned this, but keeping the MD code as 999etc is going to cause you headaches whenever you do your analysis because Stata will treat it as non-missing. So, you'll have to use if statements or some other means to exclude the MD cases, which could be especially painful if several variables with weird MD codes are involved in a particular analysis. Further, the problem is hardly unique to 999+, e.g. you would have the same issue with an MD code of 9. Anybody who uses Stata knows that the MD codes have to be ., .a, etc. So, I think you'd be doing Stata users a favor by recoding the variable with MD codes of ., .a, .b, etc., and just having some supplementary documentation that explains what was done.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index