Stata 在esttab表格中为系数和标准误差添加列标题

Stata 在esttab表格中为系数和标准误差添加列标题,stata,Stata,我正在尝试使用社区贡献的命令estout以wide格式生成回归表(即系数的单独列和标准误差的单独列),其中每列上方都有一个标题(例如“系数”和“s.e.”) 使用auto数据集的可复制示例: sysuse auto, clear regress mpg weight i.foreign estimates store m1 regress mpg weight length i.foreign estimates store m2 esttab m1 m2, wide b(3) se(

我正在尝试使用社区贡献的命令
estout
wide
格式生成回归表(即系数的单独列和标准误差的单独列),其中每列上方都有一个标题(例如“系数”和“s.e.”)

使用
auto
数据集的可复制示例:

sysuse auto, clear 

regress mpg weight i.foreign
estimates store m1

regress mpg weight length i.foreign 
estimates store m2

esttab m1 m2, wide b(3) se(3)
esttab m1 m2, wide plain b(3) se(3)
这导致输出几乎完全符合我的要求,但在每列上方没有标题(如“系数”和“s.e.”):

esttab m1 m2, wide b(3) se(3)

----------------------------------------------------------------------
                      (1)                          (2)                
                      mpg                          mpg                
----------------------------------------------------------------------
weight             -0.007***      (0.001)       -0.004**       (0.002)
0.foreign           0.000             (.)        0.000             (.)
1.foreign          -1.650         (1.076)       -1.708         (1.067)
length                                          -0.083         (0.055)
_cons              41.680***      (2.166)       50.537***      (6.246)
----------------------------------------------------------------------
N                      74                           74                
----------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
我期望的输出如下所示:

----------------------------------------------------------------------
                      (1)                          (2)                
                      mpg                          mpg                
                   coefficient    s.e.           coefficient   s.e.
----------------------------------------------------------------------
weight             -0.007***      (0.001)       -0.004**       (0.002)
0.foreign           0.000             (.)        0.000             (.)
1.foreign          -1.650         (1.076)       -1.708         (1.067)
length                                          -0.083         (0.055)
_cons              41.680***      (2.166)       50.537***      (6.246)
----------------------------------------------------------------------
N                      74                           74                
----------------------------------------------------------------------
Standard errors in parentheses
* p<0.05, ** p<0.01, *** p<0.001
----------------------------------------------------------------------
(1)                          (2)                
mpg
系数s.e.系数s.e。
----------------------------------------------------------------------
重量-0.007***(0.001)-0.004**(0.002)
0.000(.)0.000(.)
1.外国-1.650(1.076)-1.708(1.067)
长度-0.083(0.055)
_cons 41.680***(2.166)50.537***(6.246)
----------------------------------------------------------------------
N 74 74
----------------------------------------------------------------------
括号中的标准错误

*p以下内容对我有用:

sysuse auto, clear 

regress mpg weight i.foreign
estimates store m1

regress mpg weight length i.foreign 
estimates store m2

esttab m1 m2, cells("b(fmt(3) star) se(fmt(3) par)") collabels("coefficient" "s.e.")

----------------------------------------------------------------------
                      (1)                          (2)                
                      mpg                          mpg                
              coefficient            s.e.  coefficient            s.e.
----------------------------------------------------------------------
weight             -0.007***      (0.001)       -0.004**       (0.002)
0.foreign           0.000             (.)        0.000             (.)
1.foreign          -1.650         (1.076)       -1.708         (1.067)
length                                          -0.083         (0.055)
_cons              41.680***      (2.166)       50.537***      (6.246)
----------------------------------------------------------------------
N                      74                           74                
----------------------------------------------------------------------
sysuse auto, clear 

regress mpg weight i.foreign
estimates store m1

regress mpg weight length i.foreign 
estimates store m2

esttab m1 m2, cells("b(fmt(3) star) se(fmt(3) par)") collabels("coefficient" "s.e.")

----------------------------------------------------------------------
                      (1)                          (2)                
                      mpg                          mpg                
              coefficient            s.e.  coefficient            s.e.
----------------------------------------------------------------------
weight             -0.007***      (0.001)       -0.004**       (0.002)
0.foreign           0.000             (.)        0.000             (.)
1.foreign          -1.650         (1.076)       -1.708         (1.067)
length                                          -0.083         (0.055)
_cons              41.680***      (2.166)       50.537***      (6.246)
----------------------------------------------------------------------
N                      74                           74                
----------------------------------------------------------------------