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
Joinby function for Ticker and YearHello, I would like to merge MSCI and Compustat data using the following code: For MSCI data: egen y…
Problem in detecting influencial cases using cookDear Sir or Madam, I am trying to detect influencial cases using the "cook" approach with regress. …
Margins and marginsplot - interaction and obtaining two different graphs by sex ?Dear Statalists, I need your help to find the right command of margins and marginsplot. Here's what…
Why are missing values treated as positive infinity in Stata?Up until now, I have never found any practical use for this. In fact, it generally results in confus…
SGMM - problem with Sargan/Hansen testsI have a question regarding SGMM. I have run the regression 'xtabond2 gdpg lgdpg d pop educ loginv, …
Subscribe to:
Post Comments (Atom)
0 Response to Problems with the Esttab command
Post a Comment