Replies: 1 comment 2 replies
-
|
Hi @zhangc927, I am sorry for not responding to your issue right away, I was traveling and somehow lost track of it. Before explaining how to recover the intercept term, I want to quickly explain why reghdfe reports an intercept and what it means, and why fixest and pyfixest do not. When running a fixed effect regression & demeaning, one can either drop one reference level per fixed effect and include an intercept, or not drop the intercept level, but not include an intercept. The reason is the good old dummy variable trap. fixest and pyfixest opt to not drop one variable per fixed effect and instead drop the intercept. reghfde seems to drop one level and reports the intercept, which has a somewhat arbitrary interpretation as it depends on the levels of fixed effects that have been dropped. I suppose that in your use case, you want to report a baseline for a treatment effect? Say you estimate the effect of D on Y given fixed effects. In this case, you can use the predict method on a new data set in which D = 0 for all observations. Alternatively, you can recover all estimated fixed effects via the fixef() method, which recovers all fixed effects. Then you can drop one per fixed effect, sum them up, and you should also be able to get an intercept. Hope this helps! Best, Alex |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to know how to recover the intercept term and its standard error in a fixed effects model, as it seems that pyfixed does not report the intercept
Beta Was this translation helpful? Give feedback.
All reactions