
Causal survival forest on IPCW restricted-mean-survival pseudo outcomes
Source:R/causal_forest_honest.R
morie_causal_survival_forest.RdCensoring makes the raw event time unusable as a forest outcome, so
the honest forest runs on an inverse-probability-of-censoring-weighted
pseudo outcome whose expectation is the RMST at horizon. The
resulting CATE is a difference in restricted mean survival time, not
a hazard ratio. Mirrors morie.fn.csfgrf (and morie.fn.survcfg).
Usage
morie_causal_survival_forest(
time,
event,
d,
x,
horizon = NULL,
n_trees = 200L,
min_leaf = 15L,
seed = 0L
)References
Cui Y, Kosorok MR, Sverdrup E, Wager S, Zhu R (2023). Estimating heterogeneous treatment effects with right-censored data via causal survival forests. JRSS-B 85(2), 179-211.
Examples
set.seed(3)
n <- 150
X <- matrix(rnorm(n * 2), n, 2)
d <- rbinom(n, 1, 0.5)
tt <- rexp(n, rate = exp(-0.5 * d - 0.3 * X[, 1]))
ev <- as.numeric(tt < quantile(tt, 0.8))
tt <- pmin(tt, quantile(tt, 0.8))
r <- morie_causal_survival_forest(tt, ev, d, X, n_trees = 20L)
str(r, max.level = 1)
#> List of 7
#> $ cate : num [1:150] -0.246 -0.246 -0.246 -0.246 -0.246 ...
#> $ cate_oob : num [1:150] -0.255 -0.265 -0.209 -0.262 -0.238 ...
#> $ ate : num -0.246
#> $ n : int 150
#> $ forest :List of 2
#> $ horizon : num 2.25
#> $ pseudo_outcome: num [1:150] 0.445 0 0 0 0.24 ...