<>
Are we talking about the auto dataset shipped with Stata? Your numbers are a
little off from mine...
. table foreign, contents(mean mpg sd mpg mean price sd price ) row
--------------------------------------------------------------
Car type | mean(mpg) sd(mpg) mean(price) sd(price)
----------+---------------------------------------------------
Domestic | 19.8269 4.743297 6,072.4 3097.104
Foreign | 24.7727 6.611187 6,384.7 2621.915
|
Total | 21.2973 5.785503 6,165.3 2949.496
--------------------------------------------------------------
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Eduardo Nunez
Gesendet: Sonntag, 4. Oktober 2009 22:33
An: [email protected]
Betreff: st: Formatting tables with estpost & esttab
Dear statalister,
I have been trying to get the right code in estpost and esttab
(without success) to format tables as the example below (using auto
dataset):
Domestic (N=52) Foreign (N=22)
P-value Total (N=74)
Price 6179.3±3189.0 6070.1±2221.0
0.015 6146.0±2912.4
Mileage (mpg) 19.54±4.753 25.29±6.310
0.006 21.29±5.866
Repair Record 1978, n(%)
*0.000
1 2 (4.17)
0 (0)
2 (2.9)
2 8 (16.67)
0 (0)
8 (11.59)
3 27 (56.25)
3 (14.29) 30 (43.48)
4 9 (18.75)
9 (42.86) 18 (26.09)
5 2 (4.17)
9 (42.86) 11 (15.94)
*Omnibus P-value
The mean±SD [or median (IQR) when appropriate] for each variable and
for the total population with the p-value corresponding (either a
t-test or ranksum test);
For discrete variables, the n (%)...count(col percentage) and the
p-value corresponding to chi2.
I would really appreciate any help on this issue.
Best wishes,
Eduardo
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/