Skip to contents

Chains morie_causal_survival_forest() into morie_hte_blp_test(), passing the out-of-bag CATEs and the IPCW-RMST pseudo outcome. Mirrors morie.fn.csurv2.

Usage

morie_causal_survival_blp(
  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 alpha, beta, se_beta, p_value, heterogeneous, ate, horizon, n.

References

Cui Y et al. (2023). Estimating heterogeneous treatment effects with right-censored data via causal survival forests. JRSS-B 85(2), 179-211; Chernozhukov V et al. (2018). Fisher-Schultz Lecture: generic machine learning inference on heterogeneous treatment effects in randomized experiments, with an application to immunization in India. arXiv:1712.04802.

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_blp(tt, ev, d, X, n_trees = 20L)
str(r, max.level = 1)
#> List of 8
#>  $ alpha        : num -0.207
#>  $ beta         : num -3.27
#>  $ se_beta      : num 2.11
#>  $ p_value      : num 0.938
#>  $ heterogeneous: logi FALSE
#>  $ n            : int 150
#>  $ ate          : num -0.246
#>  $ horizon      : num 2.25