Skip to contents

This function runs One-Way Sensitivity Analysis (OWSA) for a given model function.

Usage

run_owsa(
  model_func = NeuroblastomaPSM::run_psm,
  model_func_args = list(models_fit = NeuroblastomaPSM::parametric_models, l_params =
    c(time_horizon = 10, cycle_length = 1/12, disc_rate_costs = 0.035, disc_rate_qalys =
    0.015, NeuroblastomaPSM::l_psm_parameters)),
  v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
  l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
  discounted_output = FALSE,
  wtp = 30000
)

Arguments

model_func

A function to be used for the model, such as the run_psm

model_func_args

A list of model arguments and parameters that are not varied in DSA

v_dsa_params

A character vector of DSA parameter names.

l_dsa_params

A list containing all model DSA parameters. The list is expected to be either l_dsa_parameters or of identical structure.

discounted_output

A logical for whether to use discounted values. Default is `FALSE`.

wtp

Numeric scalar defining the cost-effectiveness threshold, willingness-to-pay (WTP) value for the net monetary benefit calculation. Default is `30000.`

Value

A list containing the one-way sensitivity analysis (OWSA) results by intervention.

Examples

if (FALSE) {
df_owsa_results <- run_owsa(
    model_func = NeuroblastomaPSM::run_psm,
    model_func_args = list(
      "models_fit" = NeuroblastomaPSM::parametric_models,
      "l_params" = c(
        time_horizon = 10,
        cycle_length = 1/12,
        disc_rate_costs = 0.035,
        disc_rate_qalys = 0.015,
        NeuroblastomaPSM::l_psm_parameters
      )
    ),
    v_dsa_params = names(NeuroblastomaPSM::l_dsa_parameters),
    l_dsa_params = NeuroblastomaPSM::l_dsa_parameters,
    discounted_output = FALSE,
    wtp = 30000
)

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