Hi,
I want to create a table of descriptive statistics, where standard deviation (SD) is displayed below mean.
I tried "dtable" command to do so, but it only displays SD right next to mean as below.
But I need to display standard deviation below mean, just like "esttab" command does as below.
Is there a way to do this using "dtable" command? I tried "\n" as a delimiter in composite option, but it doesn't work.
I assume it can be done using "collect", but do not know how to do this.
Thank you.
I want to create a table of descriptive statistics, where standard deviation (SD) is displayed below mean.
I tried "dtable" command to do so, but it only displays SD right next to mean as below.
Code:
. sysuse auto, clear (1978 automobile data) . . dtable price mpg rep78 ---------------------------------------- Summary ---------------------------------------- N 74 Price 6,165.257 (2,949.496) Mileage (mpg) 21.297 (5.786) Repair record 1978 3.406 (0.990) ----------------------------------------
Code:
. eststo temp: estpost tabstat price mpg rep78, statistics(mean sd) columns(statistics) Summary statistics: mean sd for variables: price mpg rep78 | e(mean) e(sd) -------------+---------------------- price | 6165.257 2949.496 mpg | 21.2973 5.785503 rep78 | 3.405797 .9899323 . esttab temp, main(mean) aux(sd) ---------------------------- (1) ---------------------------- price 6165.3 (2949.5) mpg 21.30 (5.786) rep78 3.406 (0.990) ---------------------------- N 74 ---------------------------- mean coefficients; sd in parentheses * p<0.05, ** p<0.01, *** p<0.001
I assume it can be done using "collect", but do not know how to do this.
Thank you.
Comment