ce_estimate {CIMTx} | R Documentation |

The function `ce_estimate`

implements the 6 different methods for causal inference with multiple treatments using observational data.

ce_estimate( y, x, w, method, formula = NULL, discard = FALSE, estimand, trim_perc = NULL, SL.library, reference_trt, boot = FALSE, nboots, verbose_boot = TRUE, ndpost = 1000, caliper = 0.25, n_cluster = 5, ... )

`y` |
A numeric vector (0, 1) representing a binary outcome. |

`x` |
A dataframe, including all the covariates but not treatments. |

`w` |
A numeric vector representing the treatment groups. |

`method` |
A character string. Users can selected from the following methods including |

`formula` |
A |

`discard` |
A logical indicating whether to use the discarding rules for the BART based methods. The default is |

`estimand` |
A character string representing the type of causal estimand. Only |

`trim_perc` |
A numeric value indicating the percentile at which the inverse probability of treatment weights should be trimmed. The default is |

`SL.library` |
A character vector of prediction algorithms. A list of functions included in the SuperLearner package can be found with |

`reference_trt` |
A numeric value indicating reference treatment group for ATT effect. |

`boot` |
A logical indicating whether or not to use nonparametric bootstrap to calculate the 95% confidence intervals of the causal effect estimates. The default is |

`nboots` |
A numeric value representing the number of bootstrap samples. |

`verbose_boot` |
A logical value indicating whether to print the progress of nonparametric bootstrap. The default is |

`ndpost` |
A numeric value indicating the number of posterior draws for the Bayesian methods ( |

`caliper` |
A numeric value denoting the caliper which should be used when matching ( |

`n_cluster` |
A numeric value denoting the number of clusters to form using K means clustering on the logit of GPS when |

`...` |
Other parameters that can be passed through to functions. |

A list of causal estimands including risk difference (RD), odds ratios (OR) and relative risk (RR) between different treatment groups.

Hu, L., Gu, C., Lopez, M., Ji, J., & Wisnivesky, J. (2020). Estimation of causal effects of multiple treatments in observational studies with a binary outcome. Statistical Methods in Medical Research, 29(11), 3218–3234.

Hu, L., Gu, C. Estimation of causal effects of multiple treatments in healthcare database studies with rare outcomes. Health Service Outcomes Research Method 21, 287–308 (2021).

lp_w_all <- c(".4*x1 + .1*x2 - .1*x4 + .1*x5", # w = 1 ".2 * x1 + .2 * x2 - .2 * x4 - .3 * x5") # w = 2 nlp_w_all <- c("-.5*x1*x4 - .1*x2*x5", # w = 1 "-.3*x1*x4 + .2*x2*x5")# w = 2 lp_y_all <- rep(".2*x1 + .3*x2 - .1*x3 - .1*x4 - .2*x5", 3) nlp_y_all <- rep(".7*x1*x1 - .1*x2*x3", 3) X_all <- c( "rnorm(300, 0, 0.5)",# x1 "rbeta(300, 2, .4)", # x2 "runif(300, 0, 0.5)",# x3 "rweibull(300,1,2)", # x4 "rbinom(300, 1, .4)"# x5 ) set.seed(111111) data <- data_sim( sample_size = 300, n_trt = 3, X = X_all, lp_y = lp_y_all, nlp_y = nlp_y_all, align = FALSE, lp_w = lp_w_all, nlp_w = nlp_w_all, tau = c(-1.5,0,1.5), delta = c(0.5,0.5), psi = 1 ) ce_estimate(y = data$y, x = data$covariates, w = data$w, ndpost=100, method = "RA", estimand = "ATE")

[Package *CIMTx* version 1.1.0 Index]