cov.sel.high(T=NULL, Y=NULL, X=NULL,type=c("mmpc","mmhc","rf","lasso"), betahat=TRUE, parallel=FALSE, Simulate=TRUE,N=NULL, Setting=1,rep=1, Models=c("Linear", "Nonlinear", "Binary"),...)0 and 1, indicating a binary treatment variable.factor), and ordered discrete (to be specified in the data frame using ordered)."mmpc" for min-max parents and children (Markov network) and "mmhc" for max-min hill climbing (Bayesian network). Other available methods are random forests, "rf" and LASSO, "lasso".betahat=TRUE the average treatment effect for each selected subset and the full covariate vector is estimated using propensity score matching via the function Match. parallel=TRUE and there is a registered parallel backend then the computation will be parallelized. Default is parallel=FALSE. Simulate should be set to TRUE.N is the number of observations to be simulated.Setting is the simulation setting to be used. Unconfoundedness holds given X if Setting=1. M-bias given X if Setting=2. rep is the number of replications to be simulated.Models is the type of outcome models to be used, options are "Linear", "Nonlinear" and "Binary".mmpc or mmhc.cov.sel.high returns a list with the following content:
T.X.T which is also dependent with Y given T=0, the response in the control group.X.T which is also dependent with Y given T=1, the response in the treatment group.Y given T=0.Y given T=1.X.0 which is also dependent with T.X.1 which is also dependent with T.T and Y.de Luna, X., I. Waernbaum, and T. S. Richardson (2011). Covariate selection for the nonparametric estimation of an average treatment effect. Biometrika 98. 861-875
Häggström, J. (2016). Data-Driven Confounder Selection via Markov and Bayesian Networks. ArXiv e-prints.
Nagarajan, R., M. Scutari and S. Lebre. (2013) Bayesian Networks in R with Applications in Systems Biology. Springer, New York. ISBN 978-1461464457.
Scutari, M. (2010). Learning Bayesian Networks with the bnlearn R Package. Journal of Statistical Software, 35, 1-22. URL http://www.jstatsoft.org/v35/i03/.
Sekhon, J.S. (2011). Multivariate and Propensity Score Matching Software with Automated Balance Optimization: The Matching Package for R. Journal of Statistical Software, 42, 1-52. URL http://www.jstatsoft.org/v42/i07/.
bnlearn-package, randomForest, cv.glmnet and Match##Use simulated data, select subsets using mmpc and estimate ACEs
ans<-cov.sel.high(type="mmpc",N=500, rep=2, Models="Linear")
##Use simulated data, select subsets using mmpc and estimate ACEs, parallell version
#library(doParallel)
#cl <- makeCluster(4)
#registerDoParallel(cl)
#ans<-cov.sel.high(type="mmpc", parallel=TRUE, N=500, rep=10, Models="Linear")
#stopCluster(cl)
Run the code above in your browser using DataLab