Closed StarryCatte closed 9 months ago
Hi, the intercept has no real meaning in the presence of fixed effects. Indeed all variables are demeaned with respect to the fixed-effects. Hence an intercept, once demeaned, would be equal to a vector of 0s, leading to its removal during the estimation.
If you want an intercept (within fixest
), you need to abandon the fixed-effects slot and use factors (which may not be doable in practice):
res = feols(Sepal.Length ~ Sepal.Width + Petal.Length + as.factor(Species), iris)
I found that the intercept term is automatically omitted when using the 'feols' function for regression. How can I include the intercept term in my model?