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
systemfit)... But how do I combine the two ?