how to output the beta, t statistics and p values in one table simultaneously?
Like this:
Like this:
ssc install estout, replace
sysuse auto
eststo m1: regress mpg weight disp
eststo m2: regress mpg weight disp turn
esttab m1 m2, cells("b(fmt(3)) p(fmt(3))" se(fmt(3) par)) ///
collab("Coef. (SE)" "p-value", lhs("Variables")) ///
nonumbers mlab("Model 1" "Model 2") label
. esttab m1 m2, cells("b(fmt(3)) p(fmt(3))" se(fmt(3) par)) ///
> collab("Coef. (SE)" "p-value", lhs("Variables")) ///
> nonumbers mlab("Model 1" "Model 2") label
------------------------------------------------------------------------
Model 1 Model 2
Variables Coef. (SE) p-value Coef. (SE) p-value
------------------------------------------------------------------------
Weight (lbs.) -0.007 0.000 -0.006 0.000
(0.001) (0.001)
Displacement .. in.) 0.005 0.594 0.006 0.574
(0.010) (0.010)
Turn Circle (ft.) -0.139 0.442
(0.179)
Constant 40.085 0.000 43.588 0.000
(2.020) (4.964)
------------------------------------------------------------------------
Observations 74 74
------------------------------------------------------------------------
ssc install estout, replace
sysuse auto
eststo m1: regress mpg weight disp
eststo m2: regress mpg weight disp turn
esttab m1 m2, cells("b(fmt(3)) p(fmt(3))" se(fmt(3) par)) ///
collab("Coef. (SE)" "p-value", lhs("Variables")) ///
nonumbers mlab("Model 1" "Model 2") label
. esttab m1 m2, cells("b(fmt(3)) p(fmt(3))" se(fmt(3) par)) ///
> collab("Coef. (SE)" "p-value", lhs("Variables")) ///
> nonumbers mlab("Model 1" "Model 2") label
------------------------------------------------------------------------
Model 1 Model 2
Variables Coef. (SE) p-value Coef. (SE) p-value
------------------------------------------------------------------------
Weight (lbs.) -0.007 0.000 -0.006 0.000
(0.001) (0.001)
Displacement .. in.) 0.005 0.594 0.006 0.574
(0.010) (0.010)
Turn Circle (ft.) -0.139 0.442
(0.179)
Constant 40.085 0.000 43.588 0.000
(2.020) (4.964)
------------------------------------------------------------------------
Observations 74 74
------------------------------------------------------------------------
ssc install estout, replace
sysuse auto, clear
reg mpg weight, nocons
esttab, label stats(N, label({it}N))
. esttab, label stats(N, label({it}N))
------------------------------------
(1)
Mileage (m~)
------------------------------------
Weight (lbs.) 0.00625***
(16.10)
------------------------------------
N 74
------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
Comment