Instrumental variable

Instrumental variables within an SEM framework

Earlier this year, I wrote an article on using instrumental variables (IV) to analyze data from randomized experiments with imperfect compliance (read the manuscript for full details; link updated; it’s open access). In the article, I described the steps of IV estimation and the logic behind it. The sample code using two stage least squares regression (the correct analysis) is shown below (see article for specifics): library(ivpack) dat <- read.csv('http://faculty.missouri.edu/huangf/data/pubdata/pare/ivexample.csv&#39;) head(dat) ## assign takeup y ## 1 0 0 0 ## 2 0 0 0 ## 3 0 0 0 ## 4 0 0 0 ## 5 0 0 0 ## 6 0 0 0 tail(dat) ## assign takeup y ## 195 1 1 9 ## 196 1 1 10 ## 197 1 1 10 ## 198 1 1 12 ## 199 1 1 11 ## 200 1 1 9 summary(dat) ## assign takeup y ## Min.