The causalCmprsk
package is designed for estimation of average treatment effects (ATE) of
point interventions on time-to-event outcomes with \(K\geq 1\) competing events. We will
illustrate how to use causalCmprsk package by analyzing
data from an observational study on right heart catheterization (RHC)
procedure, collected by Connors et al.
(1996).
causalCmprsk?It implements both nonparametric estimation (based on the weighted Aalen-Johansen estimator) which does not assume any model for potential outcomes, and Cox-based estimation that relies on the proportional hazards assumption for potential outcomes.
It provides three measures of treatment effect on time-to-event outcomes: cause-specific hazard ratios which are time-dependent measures under a nonparametric model, risk-based measures such as cause-specific risk differences and cause-specific risk ratios, and restricted-mean-time differences which quantify how much time on average was lost (or gained) due to treatment by some specified time point. Restricted-mean-time difference is an intuitive summary of treatment effects that translates the treatment effect from the probability (risk) into the time domain and allows to quantify, for example, by how many days or months the treatment speeds up the recovery or postpones death.
It implements different weights representing different target
populations. ATE and stab.ATE weights aim to
estimate average treatment effects for the original population.
ATT weights target average treatment effects for the
population of treated, and ATC weights correspond to the
population of untreated. overlap weights aim to estimate
average treatment effects for the overlap population,
that is the population with the largest equipoise regarding the
treatment.
It uses Bayesian bootstrap for estimation of uncertainty. Bayesian bootstrap is considered a more stable alternative to the simple bootstrap for time-to-event data. We implemented parallel computing to speed up bootstrap replications.
It can be used for a Randomized Controlled Trials setting when
there is no need for emulation of baseline randomization, by using
unadj option in functions fit.nonpar and
fit.cox.
It has a function get.numAtRisk returning the
time-varying number-at-risk for both “unadjusted” (raw) data, and
“weighted” pseudo-population. The number-at-risk statistic can be used
for diagnostics of extremely influential weights.
Competing events can be dependent.
Data can be right-censored.
pckgs <- c("knitr", "tidyverse", "ggalt", "cobalt", "ggsci",
"modEvA", "naniar", "DT", "Hmisc", "hrbrthemes", "summarytools",
"survival", "causalCmprsk") # "kableExtra",ix=NULL
for (package in pckgs)
if (!requireNamespace(package, quietly = TRUE)) ix <- c(ix, package)
if (length(ix)!=0)
{
pr <- "WARNING: Packages: "
for (i in ix)
pr <- paste(pr, i, sep="")
pr <- paste(pr, "\nhave to be installed in order to successfully compile the rest of the vignette. Please install these packages and compile again.", sep="")
cat(pr)
knitr::knit_exit()
}## WARNING: Packages: ggalt
## have to be installed in order to successfully compile the rest of the vignette. Please install these packages and compile again.