Statalist


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

Re: st: How to label the value 999999999999


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: How to label the value 999999999999
Date   Tue, 7 Oct 2008 18:56:32 -0400

Dear Friedrich

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_

Regards, Sergiy Radyakin


On Tue, Oct 7, 2008 at 6:02 PM, Caleb Southworth <[email protected]> wrote:
> That's right. You cannot have a label that long. So:
>
> . tostring var, g(var2)
> var cannot be converted reversibly; no generate
>
> . tostring var, g(var2) force
> var2 generated as str11
> var2 was forced to string; some loss of information
>
> Perhaps -mvdecode- would be the way to go. So:
>
> mvdecode var, mv(999999999999)
>
> then, to use codebook or whatever,
>
> mvencode var, mv(999999999999)
>
> *
> *   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/
>
*
*   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