Skip to contents

This function performs an economic analysis based on the Markov trace and provided cost and utility parameters. It calculates both discounted and un-discounted costs and QALYs for each treatment.

Usage

perform_economic_analysis(df_markov_trace, l_params)

Arguments

df_markov_trace

A data frame containing the Markov trace with columns for time, treatment, and state occupancies (`EFS`, `PPS`, `D`).

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 vector containing two scalars: discounted costs and discounted QALYs for each treatment.

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
)

# Generate Markov trace
df_markov_trace <- NeuroblastomaPSM::calculate_markov_trace(
  df_survival_curves_long = df_survival_curves_long
)

# Perform Economic Analysis
v_psm_results <- NeuroblastomaPSM::perform_economic_analysis(
  df_markov_trace = df_markov_trace,
  l_params = params
)

v_psm_results
}