benjann / estout

Stata module to make regression tables
http://repec.sowi.unibe.ch/stata/estout/index.html
MIT License
71 stars 18 forks source link

How to combine the summary statistics and correlation tables? #63

Open fredericky123 opened 7 months ago

fredericky123 commented 7 months ago

The ideal format is below, how to combine the two tables?

image
eststo clear
quietly estpost corr variable_names, matrix elabel
esttab . using "corr.rtf",replace b(2) unstack nonum nomtitle not noobs compress varlab(`e(labels)') eqlab(`e(eqlabels)', lhs("Variables")) substitute("${hook}" "${hook}${pfmt}" "{1.00}" "{}") star( † 0.1 * 0.05 ** 0.01 *** 0.001)
eststo clear
quietly estpost sum variable_names,
esttab . using "sum.rtf",replace unstack nonum nomtitle not noobs compress /* stats(mean sd N,fmt(2 2 0)) */ cells("mean(fmt(%9.2f)) sd(fmt(%9.2f)) count(fmt(%9.0f))") label
NilsEnevoldsen commented 7 months ago

You appear to have taken this screenshot from a Statalist thread that contains the answer to your question. Did you try the provided answer? What went wrong?

fredericky123 commented 7 months ago

At that time, the option of "varlab(e(labels)') eqlab(e(eqlabels)'" is not available, I hope there is an easier way to do this