Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Label variable


From   Richard Williams <[email protected]>
To   [email protected], <[email protected]>
Subject   Re: st: Label variable
Date   Thu, 23 Feb 2006 07:22:14 -0500

At 07:11 AM 2/23/2006, Mosca, Ilaria wrote:
Dear Statalisters,

I would like to assign labels to a variable. This variable, however, has
no numeric values but letters. So I have something like:
GRADE
A
A
B
B
C
D
I would like to label "A" as "excellent", "B" as "very good", etc.
So far I tried the following command, but unsuccesfully:
Label define grade a "excellent", add

Is the problem due to the fact that Stata does not recognize letters?
Many thanks in advance for you help.
From -help label-

"label define defines a list of up to 65,536 (1,000 for Small Stata) associations of integers and text called value labels. Value labels are attached to variables by label values."

So, it sounds like you would have to create an integer counterpart to your string variable if you want labels.



-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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