Statalist


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

RE: st: How to label the value 999999999999


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: How to label the value 999999999999
Date   Wed, 8 Oct 2008 15:05:33 +0100

I agree. 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Winter
Sent: 08 October 2008 14:55
To: [email protected]
Subject: Re: st: How to label the value 999999999999

If I were going the route of replacing 999..999 with something else and 
then labelling that, I would consider replacing it with one of Stata's 
extended missing values (.a .b etc.), adn then labelling that extended 
missing value.  This sounds like exactly the sort of thing for which 
extended missings were created: cases can be distinguished from other 
sorts of missing, they are automatically excluded from numerical 
calculations, and they can be tabulated with meaningful labels.

-Nick Winter


Nick Cox wrote:
> I agree with Sergiy. Your best bet may be to replace 999999999999 with
a
> smaller number and then use a value label. 
> 
> What appears to be happening is a little curious. My interpretation
> matches that of Sergiy: 999999999999 is being grabbed by Stata and
> stored as a floating point number. I don't think -label- ever sees a
> exact integer. Whether there is an upper limit to integers to which
> labels can be attached I don't know, but that does not appear to be
the
> issue. 
> 
> It is not as though Stata can not do exact integer arithmetic with
> integers this size, because it can. You can put 999999999999 in a
> -double- variable and do that, but you will need to use a suitable
> -format- for the results to be visible. 
> 
> Nick 
> 
> Sergiy Radyakin
> 
> Stata does not allow having labels defined for floating-point values.
> Value 999999999999 is stored as a fp value.
> Hence there is no way to have a value 999999999999 with a label in
> Stata.
> 
> This is possible in SPSS, since it allows labeling any 8 bytes of
data.
> 
> In Stata only integers and extended missings may have labels, but not
> FP-values or strings.
> 
> I would suggest you replace 999999999999 with, say -9999 and have a
> label:
> label define m -9999 "[999999999999] no response"
> 
> or save the original 999999999999 value somewhere in the _notes_

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