Sharing this code on Statalist as I hope I had found it earlier (The regular indicate option discussed in most posts did not work with reghdfe, with one exception). This was missing from prior posts and solves many issues. -indicate(`r(indicate_fe)')- in esttab options automatically select the fixed effects that were included in the estimated models. If you want to change the labels use -estfe . , labels(fevar "somelabel")
REGHDFE | Frequently Asked Questions – Sergio Correia (scorreia.com)
how to indicate specific variables when using reghdfe and estfe? - Statalist
REGHDFE | Frequently Asked Questions – Sergio Correia (scorreia.com)
how to indicate specific variables when using reghdfe and estfe? - Statalist
HTML Code:
* Setup
sysuse auto
* Run and store regressions
reghdfe price weight length, a(turn) keepsing
estimates store model1
reghdfe price weight length, a(turn trunk) keepsing
estimates store model2
reghdfe price weight length, a(turn foreign) keepsing
estimates store model2
* Prepare estimates for -estout-
estfe . model*, labels(turn "Turn FE" turn#trunk "Turn-Trunk FE")
return list
* Run estout/esttab
esttab . model* , indicate("Length Controls=length" `r(indicate_fe)')
* Return stored estimates to their previous state
estfe . model*, restore

Comment