Dear Community,

I am writing to you regarding a simple estimation problem. I was curious about the command reghdfe to estimate panel data fixed effects models. However, in a simple example for illustration purpose below, I do not get the same coefficients as for xtivreg2, and wondered where the difference can come from. In the first two regressions (with ivreg2 and reghdfe), without any fixed effects, results are the same (besides marginal differences in standard errors, presumably due to different estimation procedures). However, in the next two regressions where I used xtivreg fixed effects model and reghdfe absorbing year and id fixed effects, the coefficient is different.


Code:
webuse nlswork.dta, clear


xtset id year

ivreg2 ln_wage tenure
reghdfe ln_wage tenure, noabsorb 


xtivreg2 ln_wage tenure, fe 
reghdfe ln_wage tenure, absorb(year id) noconstant

Thanks a lot for any help or comments and have a nice day,
Elio