Displaying 1 result from an estimated 1 matches for "collegedist".
Did you mean:
collegelist
2012 Nov 29
1
instrumental variables regression using ivreg (AER) or tsls (sem)
...imple) example here which purportedly illustrates the
mechanics (using 2-stage least-squares):
http://www.r-bloggers.com/a-simple-instrumental-variables-problem/
Basically, here are the R commands (reproducible example) from that
site:
# ------ begin R
library(AER)
library(lmtest)
data("CollegeDistance")
cd.d<-CollegeDistance
simple.ed.1s<- lm(education ~ distance,data=cd.d)
cd.d$ed.pred<- predict(simple.ed.1s)
simple.ed.2s<- lm(wage ~ urban + gender + ethnicity + unemp + ed.pred ,
data=cd.d)
# ------ end R
This yields the following summary:
summary(simple.ed.2s)
Ca...