Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: Labelling of categorical variables in regression outputs
From
Amal Khanolkar <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Labelling of categorical variables in regression outputs
Date
Mon, 18 Jun 2012 14:51:14 +0000
Hi Daniel & Billy,
I labelled my exposure variable as follows:
label variable motherland "mother's country of birth"
label define motherland 1 "Sweden" 2 "Western Europe + NA" 3 "Finland" 4 "Eastern Europe" 5 "Poland" 6 "F. Yugoslavia" 7 "Arab league" 8 "Iraq" 9 "Lebanon" 10 "Somalia" 11 "Syria" 12 "Turkey" 13 "Iran" 14 "South Asia" 15 "Ethiopia+Eritrea" 16 "East asia" 17 "Latin America" 18 "Chile" 19 "Africa"
label values motherland motherland
tab motherland
An example for a regression model would be:
eststo xi: regress wt_gain i.motherland malder if multibirth==2
esttab, ci wide l
What I then get is:
-----------------------------------------------------------
(1)
wt_gain
-----------------------------------------------------------
1b.mother's countr~h 0 [0,0]
2.mother's country~h -0.00455 [-0.140,0.131]
3.mother's country~h -0.0668 [-0.234,0.101]
4.mother's country~h 0.394*** [0.180,0.609]
5.mother's country~h 0.556*** [0.307,0.805]
6.mother's country~h 0.426*** [0.304,0.549]
7.mother's country~h -1.555*** [-1.870,-1.240]
8.mother's country~h -0.753*** [-0.943,-0.563]
9.mother's country~h -0.864*** [-1.058,-0.671]
10.mother's countr~h -4.253*** [-4.536,-3.970]
11.mother's countr~h -0.465*** [-0.740,-0.189]
12.mother's countr~h 0.201 [-0.0575,0.459]
13.mother's countr~h 1.169*** [0.930,1.407]
14.mother's countr~h -1.401*** [-1.676,-1.127]
15.mother's countr~h -1.255*** [-1.599,-0.911]
16.mother's countr~h -0.513*** [-0.669,-0.356]
17.mother's countr~h -0.546*** [-0.856,-0.237]
18.mother's countr~h -0.205 [-0.500,0.0889]
19.mother's countr~h -1.580*** [-1.957,-1.202]
moderns ålder, bäs~g -0.141*** [-0.145,-0.137]
Constant 13.70*** [13.58,13.81]
So, it uses the general variable lable along with numbers. From what I understand the 'l' option is what I've tried using before as well.
Thanks!
Amal
________________________________________
From: [email protected] [[email protected]] on behalf of daniel klein [[email protected]]
Sent: 18 June 2012 16:32
To: [email protected]
Subject: Re: st: Labelling of categorical variables in regression outputs
Amal,
you do not show us how you "created the above labelling", so is hard
to comment on the question whether there is a problem, with what you
did. You also do not show us how you created the dummies for your
regression models. Did you use factor variable notation? If so, there
are no labels avaiable for the dummies (yet).
-esttab- and -estout- are user-written commands (Jann, SSC) as you are
asked to explain. I am not sure about your search strategy for a
"function" (note that you are looking for an option, not a function)
for labellibng, but both -esttab- and estout-, as well as official
Stata's -estimates table- have -label- options, which is clearly
documented in the respective help files.
Best
Daniel
--
Hello all,
I've been runnning regression models (linear & logistic) and my main
exposure variable has 20 categories, including the reference. Having
so many categories it often takes time to read the output as I forget
what the categories are. In regression models, Stata names the
categories as numbers '2, 3, 4, 5, 6 etc....'.
Is there any way by which I can tell Stata to instead the use the
original labels for the categories?
[...]
*
* 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/
*
* 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/