Dear Stata community,
I have currently an issue with the esttab command. I want to run a loop of regressions with different model specifications (a baseline and two specific ones, "export" and "climat") and different dependent variables (emphre empnbh diff_h emphre01 so 4 in total), giving me at the end 12 coefficients. Moreover, even if I have several independent variables, in my regression table I would like to display only the interaction term (dummy_treat here). However, with the esttab command I get a table with 12 columns and 1 row, whereas I would something a 4rows x 3 columns table:
Array
I tried to look at outreg, estout or matrices but, I am looking for a nice 4x3 regression table with beta coefficient and standard errors in bracket
This is the code that I have for now:
gen baseline=1
estimates clear
set more off
loc list_of_xs baseline climat export
foreach y in `list_of_xs ' {
local i = 1
foreach var of varlist emphre empnbh diff_h emphre01 {
eststo model`i'`y': xi: xtreg `var' dummy_treat dummy `y' if time==1 & (dum_ger==1 | dum_lux==1 | dum_che==1 | dum_bel==1) & emphre!=. & empnbh<70 & exclu_dd_reg!=1 & empnbh6>3 & exclu1!=1 & exclu2!=1 & nace!="EA" & nace!="ER" & nace!="EQ", fe robust cluster(newid)
local ++i
}
}
esttab, replace keep(dummy_treat) cells(b(star fmt(3)) se(par({ }) fmt(3))) starlevels(* 0.10 ** 0.05 *** 0.01) stardetach depvars ///
legend mlabels("Overtime Hours" "Hours Worked" "Gap" "Probability of Overtime" "Overtime Hours" "Hours Worked" "Gap" "Probability of Overtime" "Overtime Hours" "Hours Worked" "Gap" "Probability of Overtime") varlabel (off) varwidth(15)
Do you know I could actually re-configure my 1x12 regression table in a nice 4x3 table ?
Best,
Nicolas
* NB: Please note that I am using STATA 14
Related Posts with Problems with the Esttab command
calculating r square for a model estimated with multiply imputed data (mi estimate)Dear all, I would very much appreciate your help with calculating r-squared for models estimated wi…
oaxaca: reference categoryDear Statalisters, I am using the Blinder-Oaxaca decomposition with the following code: Code: oa…
Panel data mapHi, I want to map my panel data neatly. I've id & t. I've 5 agricultural crop variables. I've …
How can I count the observations by year (intervals) AND by country?Good day, So I have a data set (panel data) counting lots of variables. But for now I am only inter…
Can I cite the name of the do file?In the do file, I want to save the data using the name of the do flle, how to cite it using macros? …
Subscribe to:
Post Comments (Atom)
0 Response to Problems with the Esttab command
Post a Comment