if (FALSE) {
data(EminentDomain)
z <- EminentDomain$logGDP$z # instruments
x <- EminentDomain$logGDP$x # exogenous variables
y <- EminentDomain$logGDP$y # outcome varialbe
d <- EminentDomain$logGDP$d # treatment / endogenous variable
lasso.IV = rlassoIV(x=x, d=d, y=y, z=z, select.X=TRUE, select.Z=TRUE)
coef(lasso.IV) # default behavior
coef(lasso.IV, selection.matrix = T) # print selection matrix
}
Run the code above in your browser using DataLab