I want to interact an IV variable with a non-IV variable and be able to add fixed effects with the felm function (the library is lfe).

I have 3 variables in my function, D (indicator variable), tau (indicator variable), and rc (continuous variable). D is endogenous and tau is exogenous, in the final equation it should be:

Where D is instrumented by tau. Doing this in the AER package with ivreg is easy, ivreg(f0 ~ D*rc | tau*rc, data=df), but in felm I can't figure it out.

My current best guess is

felm(f0 ~ 1 | 0 | (D*rc ~ tau*rc), data=df)

Which at least doesn't give an error, but the coefficients are completely different.

0 Answers