I am running regression models using Stata's factor variable option
(i.varname) to automatically create dummy variables for categorical
predictors <very cool feature>. However, the coefficient row labels in
the regression model output do not contain the value labels from the
original categorical variable. This makes it difficult to automate table
production using estout or other methods. Does anyone know how to use
the factor variable option AND have the factor variables be labeled with
the category value labels from the original categorical variable the
dummies were derived from?
For instance, if I run a regression on a dependent variable ("depvar")
and a 5-category predictor variable for poverty level ("pov") where the
value labels are defined as 1 "Below 100% FPL" 2 "100-150% FPL" 3
"150-200% FPL" 4 "200-300% FPL" and 5 "Over 300% FPL":
regress depvar i.pov
Then my regression output is labeled like this, with none of the value
labels from "depvar" being carried over into the final regression table
labels.
------------------------------------------------------------------------
-----------------
depvar | Coef. Std. Err. t
------------------------------------------------------------------------
-----------------
pov | <blank>
2 | <b>
3 | <b>
4 | <b>
5 | <b>
|
_cons |
------------------------------------------------------------------------
-----------------
What I would like to end up with is this:
------------------------------------------------------------------------
-----------------
depvar | Coef. Std. Err. t
------------------------------------------------------------------------
-----------------
Below 100% FPL | <blank>
100-150% FPL | <b>
150-200% FPL | <b>
200-300% FPL | <b>
Over 300% FPL | <b>
|
_cons |
------------------------------------------------------------------------
-----------------
Thank you,
Paul T. Shattuck, Ph.D.
*
* 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/