Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: Formatting tables with estpost & esttab


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Formatting tables with estpost & esttab
Date   Sun, 4 Oct 2009 23:10:03 +0200

<> 



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: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Eduardo Nunez
Gesendet: Sonntag, 4. Oktober 2009 22:33
An: statalist@hsphsun2.harvard.edu
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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index