Open fredericky123 opened 2 months ago
Option beta
in esttab
calls estadd beta
, which has been written long before Stata had factor variables and does not work with interactions. However, since regress
nowadays stores the beta coefficients in e(beta)
you can simply read the values from there. Example:
. clear all
. sysuse auto
. regress price weight c.mpg##i.foreign,beta
. esttab, main(beta) nobase drop(_cons)
----------------------------
(1)
price
----------------------------
weight 1.216***
(6.36)
mpg 0.516*
(2.38)
1.foreign 1.754***
(4.08)
1.foreign#~g -1.244**
(-2.83)
----------------------------
N 74
----------------------------
beta coefficients; t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001
or
. estout, cells(beta)
-------------------------
.
beta
-------------------------
weight 1.215683
mpg .5162482
0.foreign 0
1.foreign 1.753747
0.foreign#~g 0
1.foreign#~g -1.243539
-------------------------
ben
Thanks! However, I used the command reghdfe, I hope there will be one day esttab also support the interaction
If reghdfe is missing an e() matrix it should be pretty easy to add btw
sysuse auto,clear
eststo: reghdfe price weight c.mpg##i.foreign,
esttab ., beta
Could you please give me an example
The output of beta coefficient for the interaction are omitted