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

st: RE: Using Value Labels to Label Variables

From   "Nick Cox" <>
To   <>
Subject   st: RE: Using Value Labels to Label Variables
Date   Tue, 3 Feb 2009 19:46:29 -0000

There are several ways to tackle this. 

1. Don't use -xi:-. Create your dummies upstream, e.g. using -tabulate-. Then their variable labels will be explanatory. 

2. Check out -dummieslab- from SSC by P. van Kerm and another. 

3. Write a loop to map value labels to variable labels. Given 1 and 2, I won't spell that out here. 

4. No doubt others.  



Suppose I have this value label assigned to the variable totavmte_q:

           1 <=Q1 (43.25)
           2 Q1 to <=Q2 (64.35)
           3 Q2 to <=Q3 (96.54)
           4 >Q3

and I want to regress:

xi: logistic status i.totavmte_q

Stata will nicely create the following dummies:


Now I want to label the dummy variables so that they reflect the value

. label variable _Itotavmte__2 "Q1 to <=Q2 (64.35)"

I am wondering if there is a way to label the dummy variables by way of
referencing their associated value labels (these var labels will be used in
the contest of the user-written estout program).

*   For searches and help try:

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