sergiocorreia / reghdfe

Linear, IV and GMM Regressions With Any Number of Fixed Effects
http://scorreia.com/software/reghdfe/
MIT License
219 stars 57 forks source link

[BUG] Probable typos in -estfe- documentation #248

Open NilsEnevoldsen opened 2 years ago

NilsEnevoldsen commented 2 years ago

http://scorreia.com/software/reghdfe/faq.html#how-can-i-combine-reghdfe-with-esttab-or-estout

I believe the code here is intended to be:

* 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
+estimates store model3

* Prepare estimates for -estout-
-   estfe . model*, labels(turn "Turn FE" turn#trunk "Turn-Trunk FE")
+   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)')
+   esttab model*, indicate("Length Controls=length" `r(indicate_fe)')

* Return stored estimates to their previous state
-   estfe . model*, restore
+   estfe model*, restore

Note that this also changes the output.

I suspect this is responsible for the confusion in #209.

NilsEnevoldsen commented 6 months ago

These typos have tripped up another person in the wild: https://www.statalist.org/forums/forum/general-stata-discussion/general/1753267-is-it-possible-to-do-nice-latex-excel-word-tables-with-reghdfe

NilsEnevoldsen commented 6 months ago

Revisiting this, the estfe arguments are also perhaps not what you intended. turn#trunk is unused; trunk is perhaps intended, etc.

sergiocorreia commented 6 months ago

Oh, glad to know and apologies for not following up on that! Will try to update the docs soon!