dot-surv_return: Get Survival Predict Types

.surv_returnR Documentation

Get Survival Predict Types

Description

Internal helper function to easily return the correct survival predict types and to automatically coerce a predicted survival probability matrix to a distr6::Matdist.

Usage

.surv_return(
  times = NULL,
  surv = NULL,
  crank = NULL,
  lp = NULL,
  response = NULL
)

Arguments

times

(numeric())
Vector of survival times.

surv

(matrix())
Matrix of predicted survival probabilities, rows are observations, columns are times. Number of columns should be equal to length of times.

crank

(numeric())
Relative risk/continuous ranking. Higher value is associated with higher risk. If NULL then either set as lp if available or as the estimated survival expectation, computed by colSums(surv).

lp

(numeric())
Predicted linear predictor, used to impute crank if NULL.

response

(numeric())
Predicted survival time, passed through function without modification.

Details

Uses survivalmodels::surv_to_risk to reduce survival matrices to relative risks / rankings if crank is NULL.

References

Sonabend, R., Bender, A., & Vollmer, S. (2021). Evaluation of survival distribution predictions with discrimination measures. http://arxiv.org/abs/2112.04828.


mlr3proba documentation built on April 25, 2022, 5:07 p.m.