[R] simultaneous equation model with endogenous interaction terms
Arne Henningsen
arne.henningsen at gmail.com
Wed Aug 12 12:11:42 CEST 2015
Dear Janka
On 10 August 2015 at 11:25, Janka Vanschoenwinkel
<janka.vanschoenwinkel at uhasselt.be> wrote:
> Dear list members,
>
> I am building a model such as:
>
> Y1 = Y2*X1 + X2
> Y2 = Y1*X1 + X2
Do you mean the model:
Y1 = b10 + b11 * (Y2*X1) + b12 * X2 + e1
Y2 = b20 + b21 * (Y1*X1) + b22 * X2 + e2
where Y1 and Y2 are two (endogenous) dependent variables, X1 is a
potentially endogenous explanatory variable, X2 is an exogenous
explanatory variable, e1 and e2 are two potentially contemporaneously
correlated error terms, and b10, b11, b12, b20, b21, and b22 are
parameters to be estimated?
> X2 is the exogenous variable
> Z1 is the instrument of Y1
> Z2 is the instrument of Y2
>
> This is a simultaneous equation model. I know how to build a simultaneous
> equation model without interaction terms:
>
> library(systemfit)
> eq1 <- Y1~Y2+X2+Z2
> eq2 <- Y2~Y1+X2+Z1
> inst <- ~X2+Z1+Z2
> system <- list(eq1=eq1, eq2=eq2)
> reg2SLS <-systemfit(system, "2SLS", inst=inst, data=mydata)
> summary(reg2SLS)
>
> I also know how to do a normal 2SLS with interaction terms:
> library(systemfit)
> ivreg(Y1~Y2*X1 | Z2*X1, data= Alldata)
>
> However, I don't know how to deal with the interaction terms in the
> simultaneous equation model.
>
> I am experimenting both with R and STATA to see which formulation gives the
> same result in both softwares, but until know without success.
>
> Could somebody help me with this?
To estimate the above model specification, the following should work:
eq1 <- Y1 ~ I(Y2*X1) + X2
eq2 <- Y2 ~ I(Y1*X1) + X2
inst <- ~ X2 + Z1 + Z2
system <- list( eq1 = eq1, eq2 = eq2 )
reg2SLS <- systemfit( system, "2SLS", inst = inst, data = mydata )
Best regards,
Arne
--
Arne Henningsen
http://www.arne-henningsen.name
More information about the R-help
mailing list