Summary statistics only

If you want to produce a table that only contains the summary statistics of the models, but no coefficients, add cells(none) to the command:

. sysuse auto, clear
(1978 Automobile Data)

. eststo: quietly regress price weight mpg
(est1 stored)

. eststo: quietly regress price weight mpg foreign
(est2 stored)

. esttab, cells(none) scalars(rank r2 r2_a bic aic) nomtitles

--------------------------------------
                      (1)          (2)
--------------------------------------
N                      74           74
rank                    3            4
r2                  0.293        0.500
r2_a                0.273        0.478
bic                1378.6       1357.4
aic                1371.7       1348.2
--------------------------------------

. eststo clear
Code
[top]

Likelihood-ratio tests

The estadd's lrtest subcommand may be used to add results from likelihood-ratio tests as follows:

. sysuse auto, clear
(1978 Automobile Data)

. eststo A: quietly logit foreign weight

. eststo B: quietly logit foreign weight mpg price

. estadd lrtest A

Likelihood-ratio test                                 LR chi2(2)  =     23.78
(Assumption: A nested in .)                           Prob > chi2 =    0.0000

added scalars:
           e(lrtest_p) =  6.844e-06
        e(lrtest_chi2) =  23.784217
          e(lrtest_df) =  2

. esttab, scalars(lrtest_chi2 lrtest_df lrtest_p)

--------------------------------------------
                      (1)             (2)   
                  foreign         foreign   
--------------------------------------------
foreign                                     
weight           -0.00259***     -0.00685***
                  (-4.25)         (-3.43)   

mpg                                -0.121   
                                  (-1.27)   

price                            0.000926** 
                                   (3.01)   

_cons               6.283***        14.42** 
                   (3.92)          (2.66)   
--------------------------------------------
N                      74              74   
lrtest_chi2                         23.78   
lrtest_df                               2   
lrtest_p                       0.00000684   
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001

. eststo clear
Code
[top]

Rearranging the summary statistics in the table footer

The default in estout and esttab is to print the scalar summary statistics in the table footer in separate rows beneath one another (in each model's first column). Use the layout() suboption in the stats() option to rearrange the statistics. The option allows you to place the statistics in separate columns beside one another or also to combine multiple statistics in one table cell (see below). Here is an example:

. sysuse auto, clear
(1978 Automobile Data)

. eststo: quietly regress price weight
(est1 stored)

. eststo: quietly regress price weight foreign
(est2 stored)

. esttab, p wide nopar label  ///
>     stats(F p N, layout("@ @" @) fmt(a3 3 a3) ///
>         labels("F statistic" "Observations"))

------------------------------------------------------------------------------
                              (1)                          (2)                
                            Price                        Price                
------------------------------------------------------------------------------
Weight (lbs.)               2.044***        0.000        3.321***        0.000
Car type                                                3637.0***        0.000
Constant                   -6.707           0.995      -4942.8***        0.000
------------------------------------------------------------------------------
F statistic                 29.42           0.000        35.35           0.000
Observations                   74                           74                
------------------------------------------------------------------------------
p-values in second column
* p<0.05, ** p<0.01, *** p<0.001

. eststo clear
Code

In the layout() suboption, the @ character is used as a placeholder for the statistics, one after another. Statistics to be printed in the same row have to be enclosed in quotes.

[top]

Combining multiple summary statistics in one cell

The syntax for combining multiple summary statistics in one table cell is a bit clumsy, as is illustrated in the following example. The cell definition has to be enclosed in double quotes in the example because it contains a blank, and a set of compound double quotes is needed to mark off the row definition.

. sysuse auto, clear
(1978 Automobile Data)

. eststo: quietly logit foreign weight mpg
(est1 stored)

. eststo: quietly logit foreign weight mpg turn displ
(est2 stored)

. esttab, stats(chi2 df_m r2_p N, layout(`""@ (@)""' @ @))

--------------------------------------------
                      (1)             (2)   
                  foreign         foreign   
--------------------------------------------
foreign                                     
weight           -0.00391***      0.00239   
                  (-3.86)          (0.99)   

mpg                -0.169          -0.196*  
                  (-1.83)         (-2.07)   

turn                               -0.502*  
                                  (-2.28)   

displacement                      -0.0769*  
                                  (-2.06)   

_cons               13.71**         26.95** 
                   (3.03)          (3.00)   
--------------------------------------------
chi2 (df_m)     35.72 (2)       55.82 (4)   
r2_p                0.397           0.620   
N                      74              74   
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001

. eststo clear
Code

Note that in this example the layout definition could be simplified to layout(`""@ (@)""') without changing the result.