This function runs a Probabilistic Sensitivity Analysis (PSA) using a specified model function and sampled parameter values.
Usage
run_psa(
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_psa_params = names(NeuroblastomaPSM::l_psa_parameters),
l_psa_params = NeuroblastomaPSM::l_psa_parameters,
n_sim = 1000
)
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 PSA.
- v_psa_params
A character vector of PSA parameter names.
- l_psa_params
A list containing all model PSA parameters. The list is expected to be either
l_psa_parameters
or of identical structure.- n_sim
An integer specifying the number of simulations to run.
Examples
if (FALSE) {
# Run PSA
l_psa_results <- NeuroblastomaPSM::run_psa(
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_psa_params = names(NeuroblastomaPSM::l_psa_parameters),
l_psa_params = NeuroblastomaPSM::l_psa_parameters,
n_sim = 1e3
)
View(l_psa_results)
View(l_psa_results$m_psa_results)
View(l_psa_results$df_psa_samples)
}