Sholom
Sholom

Reputation: 151

Fixed Effects Regression Constant / Intercept Using LFE (FELM) in R

When calculating a panel data regression with multiple fixed effects using the felm() (of the lfe package), no constant / intercept is generated in the summary results.

How can I generate a constant / intercept?

When using Stata (xtreg, fe), for example, an intercept is generated by default.

(I apologize in advance for not providing a reproducible example...)

Here is an excerpt from Simen Gaure's article in The R Journal (Vol. 5/2, December 2013) https://journal.r-project.org/archive/2013/RJ-2013-031/RJ-2013-031.pdf

"The careful reader has noticed that the behaviour of summary() on a ’felm’ object with respect to degrees of freedom and R2 is the same as that of on an ’lm’ object when including an intercept. There is no explicit intercept in the result of felm(), but the factor structure includes one implicitly."

What if I want the intercept?? How would I generate it in the results?

Thank you!

Upvotes: 2

Views: 2988

Answers (1)

James Graham
James Graham

Reputation: 43

If you are using felm with only one or two fixed effects, I believe you can retrieve an intercept term using the getfe function with ef option set to 'zm2'. E.g. using an estimated felm object called "result", we can recover the fixed the values of the fixed effects

df = getfe(result, ef='zm2')

Then the intercept is contained in the row of df labeled "icpt" or "icpt.1".

Upvotes: 2

Related Questions