Closed krhw closed 5 years ago
The first thing that comes to mind is that you are not using the small
option of ivreg2, which does matter when you have a lot of fixed effects. For instance:
sysuse auto
ivreg2 price (weight=gear) i.turn , partial(i.turn)
ivreg2 price (weight=gear) i.turn , partial(i.turn) small
ivreghdfe price (weight=gear), a(turn)
Notice how ivreg2,small
matches ivreghdfe, but ivreg2
doesn't.
Beyond that, smaller differences could be due to with how the degrees of freedom are computed, as ivreghdfe does a few more collinearity checks between the FEs that other packages.
Thanks - the standard errors do match in my previous example after adding the small
option. I imagine that this difference would vanish asymptotically, when the number of observations is much larger than the number of FE?
Yes. But the problem is that usually with multi-way fixed effects, the ratio K/N (number of obs. over number of parameters) doesn't go to zero asymptotically, so the small option shouldn't be applied.
Great. Thanks very much for the details.
Hi Sergio,
I tried to replicate this problem, but this time clustering standard errors. say:
sysuse auto ivreg2 price (weight=gear) i.turn , cluster(turn) partial(i.turn)
ivreg2 price (weight=gear) i.turn , cluster(turn) partial(i.turn) small
ivreghdfe price (weight=gear), cluster(turn) a(turn)
Do you know why the standard errors differ?
Hello,
Would you be able to explain the source of the difference between the standard errors in ivreghdfe and ivreg2? Thanks.
Running the same regression with ivreghdfe and ivreg2 yields standard errors that are larger with ivreghdfe: