How could we add multiple scalars for creating table using esttab? Not using estout!
-
Login or Register
- Log in with
. sysuse auto, clear
(1978 Automobile Data)
. reg price mpg
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(1, 72) = 20.26
Model | 139449474 1 139449474 Prob > F = 0.0000
Residual | 495615923 72 6883554.48 R-squared = 0.2196
-------------+---------------------------------- Adj R-squared = 0.2087
Total | 635065396 73 8699525.97 Root MSE = 2623.7
------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mpg | -238.8943 53.07669 -4.50 0.000 -344.7008 -133.0879
_cons | 11253.06 1170.813 9.61 0.000 8919.088 13587.03
------------------------------------------------------------------------------
. estadd scalar wl_1 = 42
added scalar:
e(wl_1) = 42
. estadd scalar wl_2 = 8
added scalar:
e(wl_2) = 8
. esttab ., stats(wl_1 wl_2)
----------------------------
(1)
price
----------------------------
mpg -238.9***
(-4.50)
_cons 11253.1***
(9.61)
----------------------------
wl_1 42
wl_2 8
----------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
.
cls sysuse auto, clear eststo clear eststo : reg price mpg estadd scalar wl_1 = 42 estadd scalar wl_2 = 101 eststo : reg price mpg estadd scalar wl_1 = 41 estadd scalar wl_2 = 102 esttab, stats(wl_1 wl_2) eststo : reg price mpg estadd scalar wl_1 = 40 estadd scalar wl_2 = 103 esttab, stats(wl_1 wl_2) eststo clear
. esttab, stats(wl_1 wl_2)
------------------------------------------------------------
(1) (2) (3)
price price price
------------------------------------------------------------
mpg -238.9*** -238.9*** -238.9***
(-4.50) (-4.50) (-4.50)
_cons 11253.1*** 11253.1*** 11253.1***
(9.61) (9.61) (9.61)
------------------------------------------------------------
wl_1 42 41 40
wl_2 101 102 103
------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
. sysuse auto, clear
(1978 Automobile Data)
. describe make price
storage display value
variable name type format label variable label
-----------------------------------------------------------------
make str18 %-18s Make and Model
price int %8.0gc Price
. which eststo /Users/lisowskiw/Library/Application Support/Stata/ado/plus/e/eststo.ado *! version 1.1.0 05nov2008 Ben Jann . which estadd /Users/lisowskiw/Library/Application Support/Stata/ado/plus/e/estadd.ado *! version 2.3.5 05feb2016 Ben Jann . which esttab /Users/lisowskiw/Library/Application Support/Stata/ado/plus/e/esttab.ado *! version 2.0.9 06feb2016 Ben Jann *! wrapper for estout . about Stata/SE 15.1 for Mac (64-bit Intel) Revision 02 Apr 2018 [...]
Comment