I'm reporting statistics from both summarize and ttest on the same variables onto the same table using esttab, but the ttest results are automatically being reported on a different row, and I can't seem to align them. A reproducable example is below. I understand that, in this example, I could get them on the same row using just ttest results. The actual code I'm using is more complicated and requires both summarize and ttest.
Code:
clear
sysuse auto
#delimit;
eststo dom:
qui estpost sum price mpg if foreign == 0;
eststo fgn:
qui estpost sum price mpg if foreign == 1;
eststo diff:
qui estpost ttest price mpg, by(foreign);
esttab dom fgn diff,
cells(
mean(fmt(%8.1fc) pattern(1 1 0))
b(star pattern(0 0 1) fmt(%8.2fc))
)
collabels(none)
label nomtitles;
