causal.multiple.treatments

Estimation of Causal Effects of Multiple Treatments with a Binary Outcome

The goal of causal.multiple.treatments is to

knitr::opts_chunk$set(echo = TRUE)
library(causal.multiple.treatments)

Installation

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

Regression Adjustment

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")

VM Matching

causal_multiple_treatment(y = y, x = idata$trtdat, trt = trt_ind, method = "VM Matching", estimand = "ATT")

BART with and without discarding

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)

IPTW-related methods

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")

Contributions

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.



JiayiJi/causal.multiple.treatments documentation built on Nov. 14, 2019, 7:46 p.m.