Data Science, Machine Learning, Tech, Artificial Intelligence, Economics.
predict(lasso.fit, type = “nonzero”) M.excl.names <- colnames(M.excl) Z <- M.excl.names[unlist(coef)] Run an IV of Y on X, instrumenting for X with Z. Be sure to check the strength of your first stage in ivreg (or, by running your own post-LASSO first stage). Z.list <- paste(“~ “, paste(Z, collapse