Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: suggestion for Stata 8: value labels for string variables


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: suggestion for Stata 8: value labels for string variables
Date   Fri, 25 Oct 2002 17:14:38 +0100

HealthMaps
>
> I asked this list about the possibility of labeling string
> variables, like
> ICD9 or 10 codes, census tract identifiers, with value
> labels. An ominous
> silence.
>
> I asked tech support who did everything possible to help me
> out suggesting
> work-arounds. In the end, Stata does not allow value
> labeling of string
> variables. (i hope i am wrong...) Tech support has very nice people.
>
> Unfortunately all my data is loaded with string variables
> for codes for
> various diseases, hospital procedures, geographic codes,
> etc. and to put
> those labels as part of the database would significantly enlarge the
> database. I tried the encode route but this means that
> every database I have
> with the same set of codes has a different set of encoded values.
>
> So I suggest that the capacity to value label string
> variables be added to
> Stata 8. Something that one can do in SAS, SPSS, and S-Plus.
>

You can't attach value labels to string variables
in Stata. You can of course attach value labels
to numeric variables.

However, I don't understand what is wanted here.
I'd like to know what tasks are made difficult or impossible
because you can't have this.

I see string values as being their own
value labels. If you want as it were short
and long versions of some string variable,
then they can be put in two related string
variables.

I can see issues in terms of

1. storage overhead

2. smart ways of abbreviating long
to short

but please spell out why you want this.

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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