Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Esttab and estout and several additional stats


From   Maria Ana Vitorino <vitorino@umn.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Esttab and estout and several additional stats
Date   Mon, 7 Oct 2013 06:58:44 -0500

Dear statalist users,

I understand it is possible to list some additional statistics at the end of a table by using esttab and stats()
For example, if we do
sysuse auto
quietly regress price weight mpg
test weight=mpg
estadd scalar F_diff = r(F)
estadd scalar p_diff = r(p)
esttab, stats(F_diff p_diff)

at the end of the table we get
-------------------------
F_diff           .3582543
p_diff           .5513822
-------------------------


My question is then: Is it possible to list a vector with several stats ?

For example, let's say we create the vector "gear":

tabstat gear_ratio, by(rep78) stat(median) save
tabstatmat medgear, nototal
estadd matrix gear=medgear

1:p50       2.905
2:p50        2.73
3:p50   2.9300001
4:p50       3.225
5:p50         3.2

how can I add all this info at the end of the table without having to create 5 distinct scalars and adding them one by one?

Any help is appreciated!

Thanks!
Ana



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index