If I remember correctly, esttab, indicate()
parses the column names of the parameter vector e(b)
to search for the indicator variables. As reghdfe does not contain the fixed effects in there, the search is therefore unsuccessful.
As a quick fix, you can run:
reghdfe y x o.industry, absorb(industry) cluster(industry)
This adds industry as an omitted variable to the regression (this does not alter the result but creates an entry in e(b)
as a missing value). The downside of this fix is that if you omit the fixed effects but keep the o.industry
, the output will show erroneously a "yes"
, even though the variable is not included in the regression. As a side note, you can omit the i.
in the absorb and cluster option.
Example:
sysuse auto, clear
// initial problem
reghdfe price turn, absorb(foreign)
est store test1
// quick fix
reghdfe price turn o.foreign, absorb(foreign)
est store test2
// incorrect indication
reghdfe price turn o.foreign, noabsorb
est store test3
esttab test1 test2 test3, indicate(foreign)
Output:
. esttab test*, indicate(foreign)
------------------------------------------------------------
(1) (2) (3)
price price price
------------------------------------------------------------
turn 379.2*** 379.2*** 207.6**
(4.12) (4.12) (2.76)
_cons -8871.0* -8871.0* -2065.0
(-2.42) (-2.42) (-0.69)
foreign No Yes Yes
------------------------------------------------------------
N 74 74 74
------------------------------------------------------------
t statistics in parentheses
* p<0.05, ** p<0.01, *** p<0.001