Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

re: st: AW: Labeling variable values in Regression Tables

From   Christopher Baum <>
To   <>
Subject   re: st: AW: Labeling variable values in Regression Tables
Date   Thu, 10 Jun 2010 12:02:37 -0400

Thomas said
Is anyone familiar with a way to have the values of the categorical
independent variables show up in regression tables?  For instance, for
the variable agegrp, I'd like to see the value of 2 show up as "45-54",
3 as "55-64", 4 as "65-74", and so on.

// attach a label to auto rep78 for illustrative purposes
label drop rr
label def rr 1 poor 2 fair 3 avg 4 good 5 great
label val rep78 rr

// extract the label texts and build the coeflabels list
lab l rr
forv i=1/`r(max)' {
	loc l: label rr `i'
	loc ll "`ll'  `i'.rep78 `l'"

// eststo, esttab from Ben Jann's estout package on SSC
eststo clear
eststo: reg price i.rep78
esttab, drop(1b.rep78) coeflabels(`ll')

Kit Baum   |   Boston College Economics & DIW Berlin   |
                              An Introduction to Stata Programming  |
   An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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