Hi,
I am trying to add a heading for each categorical variable in my regression.
This is the code I am now using:
oprobit life_satisfaction population ${x}
est store est1
//LS for jews:
oprobit life_satisfaction ${x} i.migration i.migrate_year if population==1
est store est2
//LS for arabs:
oprobit life_satisfaction ${x} i.religion_arab
est store est3
esttab est1 est2 est3 using ls.doc, replace noomitted nobaselevels se pr2 label mlabels("Pooled" "Jews" "Arabs")
To generate the outcome:
--------------------------------------------------------------------
(1) (2) (3)
Pooled Jews Arabs
--------------------------------------------------------------------
married 0.251*** 0.243*** 0.245
(0.0558) (0.0645) (0.127)
divorced/separated -0.0670 -0.0194 -0.236
(0.0755) (0.0816) (0.254)
widow(er) 0.0453 0.0218 0.236
(0.0966) (0.106) (0.261)
1-<2 -0.0692 -0.0755 -0.0791
(0.0434) (0.0475) (0.120)
2+ -0.255** -0.127 -0.301
(0.0839) (0.115) (0.174)
I would like the outcome to be similar to the one below: (now added it by hand, but am searching for a code....)
--------------------------------------------------------------------
(1) (2) (3)
Pooled Jews Arabs
--------------------------------------------------------------------
Marital_status
married 0.251*** 0.243*** 0.245
(0.0558) (0.0645) (0.127)
divorced/separated -0.0670 -0.0194 -0.236
(0.0755) (0.0816) (0.254)
widow(er) 0.0453 0.0218 0.236
(0.0966) (0.106) (0.261)
Room_pp
1-<2 -0.0692 -0.0755 -0.0791
(0.0434) (0.0475) (0.120)
2+ -0.255** -0.127 -0.301
For the example above, I would like to add "marital_status" above the categorical variable and "room_pp" above another categorical variable. These are the names of the variables in my dataset
I have been looking up statalist but didn't find a simple solution for this.
Hope my answer is clear enough.
Thank you,
Shir.
Related Posts with Adding group name to categorical variables in esttab command
Problems with importing datasheatHey :D I have a problem with importing all the variables from a datasheat. I have mostly categorica…
Lasso bug - always included variable disappearsHi all, I'm running into a very bizarre issue while running the -lasso linear- command. I've been u…
loopHello everybody, I am a beginner in stata programming. However, I am looking for help in programming…
Loop with the command usespss in Stata 16Hi. I have to do the same calculations with some data sets in format .sav. I did this lines but they…
Summary statistics for 2 dimensionsHi, I would like to do the following: I have a panel dataset with x groups and y years. For each yea…
Subscribe to:
Post Comments (Atom)
0 Response to Adding group name to categorical variables in esttab command
Post a Comment