Skip to contents

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

Arguments

time

Follow-up times (positive).

event

1 = event observed, 0 = right-censored.

d

Binary 0/1 treatment.

x

Covariates.

horizon

Restriction time; default the 90th percentile of time.

n_trees, min_leaf, seed

Forest hyperparameters.

Value

List with cate, cate_oob, ate, horizon, pseudo_outcome, n, forest.

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 ...