sergiocorreia / ivreghdfe

Run IV/2SLS with many levels of fixed effects (i.e. ivreg2+reghdfe)
MIT License
77 stars 27 forks source link

ivreghdfe throws off ivreg2 instrument collinearity detection? #43

Open droodman opened 2 years ago

droodman commented 2 years ago

These two commands return basically the same results:

ivreg2 price i.turn (headroom = foreign#c.turn)
ivreghdfe price (headroom = foreign#c.turn), absorb(turn)

However, in the first one, ivreg2 detects that the instruments foreign#c.turn are multicollinear with i.turn, whereas in the second it does not detect collinearity as far as I can see, looking at return macros such as e(exexog). This matters to me because I would like to make boottest return the same results after both. However, boottest relies on ivreg2 to detect and mark collinear instruments. Since none are marked in the second case, boottest is returning wrong results after that command line, at least when doing the Anderson-Rubin test.

Do you think there's anything to be done about this? Thanks.