Bookmark and Share

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

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

st: esttab and additional stats (in matrix form)

From   Maria Ana Vitorino <>
Subject   st: esttab and additional stats (in matrix form)
Date   Fri, 4 Oct 2013 15:23:35 -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 matrix with 1 column but several rows instead of separate scalars? 

For example, let's say we create the matrix "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 without having to create 5 distinct scalars?

Any help is appreciated!


*   For searches and help try:

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