Instrumental Variables and Country Fixed Effects

Hi everyone,

I am performing a regression on panel data, with country FE.
However, one of my explanatory variables is probably endogenous.
Thus, I would like to use an instrumental variable approach to be able to compare with the standard linear approach (i.e. to be able to perform a Hausman test).

My question is: how do I create a Instrumental Variable model with fixed effects (in my case, individual fixed effects) on R ?

I know how to create fixed effects on panel data (using plm), how to create/use instrumental variables (slightly harder - could use ivreg or systemfit)... But how do I combine the two ?

You can check this solution...

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

it is indeed the solution, thanks for your answer !

in a case where x1 is potentially endogenous, the solution is the following:

plm(y = x1 + x2  | x2 + z1, model = "within", effect = "twoways")

the instruments are specified after the | sign (both exogenous explanatory variables [x2 in that case] and the instruments [z1] should be included after that sign). More information on the CRAN - Panel Data Econometrics in R.
(search for the header " Instrumental variable estimators").