Internal helper function to easily return the correct survival predict types and to automatically coerce a predicted survival probability matrix to a distr6::Matdist.
.surv_return(
times = NULL,
surv = NULL,
crank = NULL,
lp = NULL,
response = NULL
)(numeric()) Vector of survival times.
(matrix()) Matrix of predicted survival probabilities, rows are observations,
columns are times. Number of columns should be equal to length of times.
(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).
(numeric()) Predicted linear predictor, used to impute crank if NULL.
(numeric()) Predicted survival time, passed through function without
modification.
Uses survivalmodels::surv_to_risk to reduce survival matrices to relative
risks / rankings if crank is NULL.
Sonabend, R., Bender, A., & Vollmer, S. (2021). Evaluation of survival distribution predictions with discrimination measures. http://arxiv.org/abs/2112.04828.