Predict survival probabilities at specified time points from a survival model object, and labels them with the treatment and endpoint information.
Arguments
- surv_mod
A survival model object from which to extract survival probabilities.
- treatment_name
Character string specifying the treatment name associated with the survival model.
- end_point
Character string indicating the endpoint the survival model is based on.
- time_points
Numeric vector of time points at which survival probabilities should be calculated.
Value
A data frame with survival probabilities at specified time points, labeled with treatment and end point information.
Examples
if (FALSE) {
# Load the fitted Gompertz model parameters
models_fit <- NeuroblastomaPSM::parametric_models[[4]]
df_survival_curve <- NeuroblastomaPSM::predict_survival_curve(
surv_mod = models_fit,
treatment_name = "Isotretinoin",
end_point = "OS",
time_points = seq(0, 10, 1/12)
)
rbind(
head(df_survival_curve, n = 5),
tail(df_survival_curve, n = 5)
)
}