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

st: string value labels


From   "HealthMaps" <[email protected]>
To   <[email protected]>
Subject   st: string value labels
Date   Wed, 23 Oct 2002 06:02:56 -0700

I have a list of ICD9 and ICD10 codes which are strings

which are assigned in another stat program as follows,

format icd
'R233'='Spontaneous ecchymoses'
'R234'='Changes in skin texture'
'R238'='oth unspec skin changes'
'R25' ='Abnorm involuntary movements'
'R250'='Abnorm head movements'
'R251'='Tremor, unspec'
'R252'='Cramp, spasm'
'R253'='Fasciculation'
thousnads more ...

and I would like to make
label define icd R233  "Spontaneous ecchymoses"
label define icd R234  "Changes in skin texture"
label define icd R238  "oth unspec skin changes"
label define icd R25   "Abnorm involuntary movements"
label define icd R250  "Abnorm head movements"
...
so that eventually when I do some descriptive statistics I will get results
using label values that gave the disease name and not the code.

But as I read the help on label define, the codes must be numbers. How can
one make value labels in Stata where the values are strings and not
integers? I have used encode to change the string variable to a number, but
.. how do I get a value label associated with it?

Thanks

Richard Hoskins
WA State Dept of Health
Olympia, WA USA





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