
Make predictions for time-to-event outcomes at specified horizon times
Source:R/survival.R
predict_survival.RdMake predictions for time-to-event outcomes at specified horizon times
Usage
predict_survival(
x,
landmarks,
horizons,
method = "survfit",
dynamic_covariates = c(),
include_clusters = FALSE,
censor_at_horizon = FALSE,
validation_fold = 0,
...
)Arguments
- x
An object of class
LandmarkAnalysis.- landmarks
Numeric vector of landmark times.
- horizons
Vector of prediction horizons up to when the survival submodel is fitted.
- method
Name of the function that is used to make predictions. At the moment, 'survfit' is the only supported @method.
- dynamic_covariates
Vector of time-varying covariates to be used in the survival model.
- include_clusters
Boolean indicating whether to propagate cluster membership to survival analysis.
- censor_at_horizon
Boolean indicating whether to censor observations at horizon times
- validation_fold
If positive, cross-validation fold where model is fitted. If 0 (default), model fitting is performed on the complete dataset.
- ...
Additional arguments passed to the prediction function (e.g. number of classes/clusters for lcmm).
Value
An object of class LandmarkAnalysis.