Calculates the difference in RMST between "low" and "high" risk groups up to
a time horizon \(\tau\). Groups are defined by median-splitting the
risk_vec.
compute_rmst_difference(
time_vec,
status_vec,
risk_vec,
tau,
surv_mat = NULL,
eval_times_full = NULL,
model_type = "other"
)The RMST difference (RMST_low - RMST_high), or NA_real_.
Numeric vector of test times.
Numeric vector of test statuses.
Numeric vector of predicted risk scores for test data.
The time horizon \(\tau\) for integration.
Optional. A matrix of individual survival predictions (rows=subjects, cols=times) used for model-based RMST calculation.
Optional. A numeric vector of time points
corresponding to the columns of surv_mat.
Optional string (e.log., "rstpm2", "flexsurv") indicating if a model-based RMST calculation should be attempted.