Statalist


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

st: AW: Displaying labeled values of variables


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Displaying labeled values of variables
Date   Tue, 4 Aug 2009 09:55:20 +0200

<> 

While you are at it, you might also want to take note of
http://www.stata-journal.com/sjpdf.html?articlenum=dm0009 on a related
problem.

On your other question, -help labelbook- may be useful.



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Miranda Kim
Gesendet: Dienstag, 4. August 2009 09:40
An: statalist@hsphsun2.harvard.edu
Betreff: st: Displaying labeled values of variables

A bit of a basic question...
say gender is a 0/1 (binary) variable with label sexlab where 0 = "Male" 
and 1 = "Female"
if I want to display this variable for observation i, I type:
di gender[i]
this will then display a 0 or 1
How could I change this to display it's 'labeled' value (i.e. "Male" or 
"Female")
also, how can I define a new string variable that contains the 'labeled' 
values of gender?
Thanks a lot for your help.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index