I am trying to format a series of regression tables with estout/esttab. My regressions all have the same sample size. Is there a way to include the sample size in the table notes / footer instead of having the same information repeated for all models?
Is there a way to use a variable like the sample size in esttab, addnotes or estout, notes?
See reproducible example below:
Code:
. sysuse auto
(1978 Automobile Data)
. eststo: quietly regress price weight mpg
(est1 stored)
. eststo: quietly regress price weight mpg foreign
(est2 stored)
. esttab
--------------------------------------------
                      (1)             (2)   
                    price           price   
--------------------------------------------
weight              1.747**         3.465***
                   (2.72)          (5.49)   
mpg                -49.51           21.85   
                  (-0.57)          (0.29)   
foreign                            3673.1***
                                   (5.37)   
_cons              1946.1         -5853.7   
                   (0.54)         (-1.73)   
--------------------------------------------
N                      74              74   <- This is what I wanted to move to the table footer
--------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
This is what I wanted:
Code:
--------------------------------------------
                      (1)             (2)   
                    price           price   
--------------------------------------------
weight              1.747**         3.465***
                   (2.72)          (5.49)   
mpg                -49.51           21.85   
                  (-0.57)          (0.29)   
foreign                            3673.1***
                                   (5.37)   
_cons              1946.1         -5853.7   
                   (0.54)         (-1.73)   
--------------------------------------------
Notes: N=74, t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
0 Response to Variable information in table notes using estout/esttab
Post a Comment