[R] Instrumental Variables Regression
Achim Zeileis
Achim.Zeileis at wu-wien.ac.at
Tue Dec 15 16:25:50 CET 2009
On Tue, 15 Dec 2009, Jinsong Zhao wrote:
> Hi there,
>
> I hope to build a model Y ~ X1 + X2 + X3 + X4 with X1 has two
> instrumental variable A and B, and X2 has one instrumental variable A. I
> have searched the R site and mailling list, and known that the tsls()
> from sem package and ivreg() from AER package can deal with instrumental
> variable regression, however, I don't know how to formula the model.
It's not completely clear to me but it seems that you want to use A and B
as well as X3 and X4 as instruments. So you can either use
ivreg(Y ~ X1 + X2 + X3 + X4 | A + B + X3 + X4)
or
tsls(Y ~ X1 + X2 + X3 + X4, instruments = ~ A + B + X3 + X4)
If your data are time series data, then dynlm() from package "dynlm" might
also be useful. It takes the same model specification as tsls(). See the
corresponding man pages for more examples.
Best,
Z
> Any suggestion will be really appreciated. Thanks in advances!
>
> Regards,
> Jinsong
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
More information about the R-help
mailing list