causal.multiple.treatments
The goal of causal.multiple.treatments is to
knitr::opts_chunk$set(echo = TRUE) library(causal.multiple.treatments)
You can install the latest version directly from GitHub with devtools:
install.packages("devtools") devtools::install_github("JiayiJi/causal.multiple.treatments") ```` <!-- * the most recent officially-released version from CRAN with --> <!-- ```R --> <!-- install.packages("causal.multiple.treatments") --> <!-- ```` --> <!-- * the latest development version from GitHub with --> <!-- ```R --> <!-- install.packages("devtools") --> <!-- devtools::install_github("JiayiJi/causal.multiple.treatments") --> <!-- ```` --> ## Example of use ### Data We generated the data under scenario 1 in the paper. ```r library(causal.multiple.treatments) set.seed(3242019) idata = data_gen(n = 1200, ratio =1,scenario = 1) trt_ind <- as.numeric(idata$trtdat$trt_ind) all_vars <- idata$trtdat[, -1] #exclude treatment indicator y <- idata$Yobs
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method ="Regression Adjustment", estimand = "ATE") causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method ="Regression Adjustment", estimand = "ATT")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "VM Matching", estimand = "ATT")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "BART", estimand = "ATE", discard = TRUE)
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "BART", estimand = "ATE", discard = FALSE)
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "BART", estimand = "ATT", discard = TRUE)
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "BART", estimand = "ATT", discard = FALSE)
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-Logistics", estimand = "ATE")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-Logistics-Trim", estimand = "ATE")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-GBM", estimand = "ATE")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-GBM-Trim", estimand = "ATE")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-Logistics", estimand = "ATT")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-Logistics-Trim", estimand = "ATT")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-GBM", estimand = "ATT")
causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "IPTW-GBM-Trim", estimand = "ATT")
If you find small bugs, larger issues, or have suggestions, please file them using the issue tracker or email the maintainer at Jiayi.Ji@mountsinai.org. Contributions (via pull requests or otherwise) are welcome.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.