Statalist The Stata Listserver


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

st: value labels


From   "Raoul C Reulen" <[email protected]>
To   <[email protected]>
Subject   st: value labels
Date   Thu, 18 May 2006 21:36:14 +0100

Hi,
 
I am trying to define value labels for a variable called 'sex'.
 
. label define lab_sex 1 male 2 female
. label values sex lab_sex
 
However, now I want to list a different variable according to the value label like this:
 
.list var2 if sex=="male"
 
but that gives me an error message, but:
 
.list var2 if sex==1
 
works. What have I done wrong?
 
 
Thanks,
 
Raoul

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