![]()  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Labeling values of variables
From 
 
Philipp Rehm <[email protected]> 
To 
 
[email protected] 
Subject 
 
Re: st: Labeling values of variables 
Date 
 
Thu, 14 Feb 2008 09:35:40 -0500 
This doesn't do exactly what you want, but may be helpful.
I tend to -decode- the variables I use with -xi-. The labels are more 
informative that way.
In your example, I would do something like:
decode relation, gen(RELATION)
decode sex, gen(SEX)
xi i.RELATION*i.SEX
The automatically assigned labels (in Stata 9.2, Win XP) then become 
(examples):
RELATION==divorced & SEX==male
RELATION==married & SEX==male
RELATION==single & SEX==male
etc.
But again, not exactly the output you are looking for.
HTH anyway,
Philipp
Peter Dijkstra wrote:
Dear Statalisters,
I like to have sensible value labels of variables, and use
   label define relation 0 "single" 1 "married" 2 "divorced"
   label define sex 0 "female" 1 "male"
in StataSE 8.2. However, when using
   xi i.relation * i.sex
the labels automatically become "relation==1 & sex==1", "relation==2 & sex==1". How do I obtain labels which say "married male" and "divorced male"?
@Nick: I know that I have to mention my version of Stata, but sometimes I do forget...sorry.
Cheers, Peter
*
*   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–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |