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

st: Displaying labeled values of variables

From   Miranda Kim <>
Subject   st: Displaying labeled values of variables
Date   Tue, 04 Aug 2009 08:39:43 +0100

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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index