Skip to contents

This function predicts cumulative survival curves using fitted survival models over a specified time horizon.

Usage

predict_cumulative_survival(models_fit, l_params)

Arguments

models_fit

A named list of fitted survival models.

l_params

A list of model parameters including the list of parameters in the list l_psm_parameters in addition to:

  • time_horizon: The time horizon for the model in years.

  • cycle_length: The length of a model cycle measured in years.

  • disc_rate_costs: The annual discount rate for incurred costs.

  • disc_rate_qalys: The annual discount rate for accrued QALYs.

Value

A data frame containing the predicted cumulative survival curves with columns for time, treatment, and survival probabilities for different endpoints.

Examples

if (FALSE) {
# Load the fitted Gompertz model parameters
models_fit <- NeuroblastomaPSM::parametric_models

# Define model parameters
params <- c(
  time_horizon = 10,
  cycle_length = 1/12,
  disc_rate_costs = 0.035,
  disc_rate_qalys = 0.015,
  NeuroblastomaPSM::l_psm_parameters
)

# Predict cumulative survival
df_survival_curves_long <- NeuroblastomaPSM::predict_cumulative_survival(
  models_fit = models_fit,
  l_params = params
)

rbind(
  head(df_survival_curves_long, n = 5),
  tail(df_survival_curves_long, n = 5)
)
}