Hello, I would appreciate any insights as to how to combine the results from tabstat with regression estimates (beta and se) using esttab.
In particular, the following code yields the first two columns as desired:
Now I would like to add a 3rd column to the previous table with the beta coefficients and standard errors from the following two regressions (combined vertically under one column header "Difference"):
Thank you very much in advance.
In particular, the following code yields the first two columns as desired:
Code:
sysuse auto, clear
gen id=1
eststo clear
eststo m1 : estpost tabstat mpg weight if foreign==0 & rep78==3, by(id) statistics(mean semean) columns(statistics) nototal
eststo m2 : estpost tabstat mpg weight if foreign==1 & rep78!=3, by(id) statistics(mean semean) columns(statistics) nototal
esttab m1 m2 using $tables/test.tex, cells(mean(fmt(%12.1f)) semean(fmt(%12.2f) par(( )))) ///
label nonumbers unstack collabels(none) eqlabels(none) ///
mlabels("Domestic" "Foreign") nomtitles nonotes replace booktabs
Code:
eststo clear
reg mpg foreign
eststo m3 : reg mpg foreign
eststo m4 : reg weight foreign
esttab m3 m4 using $tables/test2.tex, keep(foreign) ///
label nonumbers unstack collabels(none) eqlabels(none) ///
mlabels("Diff-mpg" "Diff-weight") nomtitles nonotes replace booktabs

Very last question -- if I want to add significance stars to the "Difference" column, is there a way to do that? I tried adding "star" in the options, but that didn't seem to be the solution.
Comment