Closed mcaceresb closed 2 years ago
Thanks for spotting the bug! It turns out that when I recoded ivreghdfe due to reghdfe 6 update, I forgot to pass by the weight locals. Should be updated now on v1.2:
sysuse auto, clear
reghdfe price weight (length=displacement) [fw=trunk], a( foreign) version(3) // test against old version of reghdfe
ivreghdfe price weight (length=displacement) [fw=trunk], a(foreign) // version 1.2 20oct2021
which ivreghdfe
@sergiocorreia Just tried it and it seems to have done the trick; thanks!
Hi,
where can I find v1.2 ?
I'm finding that the same issue persists with the most recent version: ivreghdfe 1.1.1 14Dec2021.
In particular, ivreghdfe produces the correct coefficients in two situations: (1) with fixed effects in absorb, but without weights; and (2) without fixed effects in absorb (i.e., just a constant), but with weights.
However, the coefficients are incorrect with both absorbed FE's and weights.
Any ideas?
I can confirm that 1.2 fixes this. I think this bug (and the fix) need to be mentioned in the changelog of 1.2, so that people are aware that older versions of ivreghdfe do not support weights (except in the irrelevant case where there are no FE and one may just directly use ivreg2 instead).
It seems that
ivreghdfe
does not use weights when applying the HDFE transformation? Here is an example:The output: