On Mon, 1 Aug 2011, Claudio Shikida (??????????) wrote:
> Hello,
>
> I am looking for some help with this question: how could I test structural
> breaks in a instrumental variables?s model?
In principle, most of tests used in the standard linear regression model
can also be transferred to the IV case. However, many of the functions in
"strucchange" do not do this. A notable exception is the function
gefp(),
see its manual page for references. This allows you to do something like
gefp(y ~ x1 + x2 | z1 + z2, fit = ivreg, data = d)
etc.
> For example, I was trying to do something with my model with three time
> series.
>
> tax_ivreg <- ivreg(l_y ~ l_x2 + l_x1+ dl_y | lag(l_x2, -1)+lag(l_x2,
-2)+
> lag(l_x1, -1)+lag(l_x1, -2)+lag(l_y, -1)+lag(l_y, -2), data=tax1)
> summary(tax_ivreg)
I guess that this does not do what you want it to do. I would guess that
this essentially yields a standard linear regression because the lag() is
not correctly processed. If you want to use ivreg(), you need to set up
the lagged variables by hand in advance. Alternatively, you can use
dynlm() from the "dynlm" package which allows you to use lag() or the
simpler L() function in the formula together with "zoo" data.
For an example, how to set up the lagged variables by hand, you can look
at the manual page of breakpoints(), especially the seatbelt data example.
hth,
Z
> ## after estimating it, something weird happened with the several tests in
> package "strucchange". For example:
>
> cusum <- efp(l_y ~ l_x2 + l_x1+ dl_y | lag(l_x2, -1)+lag(l_x2, -2)+
> lag(l_x1, -1)+lag(l_x1, -2)+lag(l_y, -1)+lag(l_y, -2), data=tax1,
> type="OLS-CUSUM")
> sctest(cusum)
> plot(cusum)
> coef(cusum, breaks=2)
>
> ## And:
>
> cusum <- efp(tax_ivreg, data=tax1, type="OLS-CUSUM")
> sctest(cusum)
> plot(cusum)
> coef(cusum, breaks=2)
>
> ## 1. The plot of the two above were very different and
> ## 2. When I ask for the breaks, instead of the dates, it returned me a
line
> of the summary of the estimated "tax_ivreg"
>
> Any help would be very appreciated.
>
> Thanks
>
> Claudio
>
>
>
>
> --
> http://www.shikida.net and http://works.bepress.com/claudio_shikida/
>
> Esta mensagem pode conter informa??o confidencial e/ou privilegiada. Se
voc?
> n?o for o destinat?rio ou a pessoa autorizada a receber esta mensagem, n?o
> poder? usar, copiar ou divulgar as informa??es nela contidas ou tomar
> qualquer a??o baseada nessas informa??es. Se voc? recebeu esta mensagem por
> engano, por favor avise imediatamente o remetente, respondendo o presente
> e-mail e apague-o em seguida.
> This message may contain confidential and/or privileged ...{{dropped:9}}
>
>