01 Model inputs

In this component, all model input variables are declared and values are set. The point of this component is to group input variables together and organize them in a logical fashion that can be easily communicated to a user.

load_mort_data()

Load mortality data

load_all_params()

Load all parameters

update_param_list()

Update parameters

02 Decision model

This component is the heart of the decision analysis: the implementation of the decision model. In this section of the framework, a function is created that maps model inputs to outputs, via the dynamic and/or stochastic processes that the decision model represents. The model itself could be a decision tree, Markov model, stochastic simulation, and so on. The output stored from the model at this stage should be sufficiently general and comprehensive to accommodate calibration, validation, and the main policy analysis. Constructing the model as a function at this stage facilitates subsequent components of model development and analysis, as these processes will all call the same model function but pass different parameter values and/or calculate different final outcomes from the model outputs. The model function also facilitates the use of parallel computing efforts for computationally intensive tasks, such as calibration and probabilistic sensitivity analysis (PSA).

decision_model()

Decision Model

check_sum_of_transition_array()

Check if the sum of transition probabilities equal to one.

check_transition_probability()

Check if transition array is valid

03 Calibration

In this component, the unknown parameters of the decision model are calibrated by matching model outputs to specified calibration targets using a Bayesian approach. The function calibration_out produces model outputs corresponding to the calibration targets. This function takes a vector of parameters that need to be calibrated and a list with all parameters of decision model and computes model outputs to be used for calibration routines. We use the IMIS function from the IMIS package that calls the functions likelihood, sample.prior and prior, to draw samples from the posterior distribution. The functions are specified in the 03_calibration_functions.R file in the R folder.

calibration_out()

Generate model outputs for calibration from a parameter set

likelihood()

Likelihood

log_lik()

Log-likelihood function for a parameter set

log_post()

Evaluate log-posterior of calibrated parameters

log_prior()

Evaluate log-prior of calibrated parameters

posterior()

Evaluate posterior of calibrated parameters

prior()

Evaluate prior of calibrated parameters

sample.prior()

Sample from prior distributions of calibrated parameters

04 Validation

In this component, the calibrated model is internally validated by comparing the predicted outputs from the model evaluated at the calibrated parameters against the calibration targets. The computation of the model-predicted outputs using the MAP estimate is done by inserting the v_calib_post_map data into the calibration_out function previously described in component 03 Calibration. The function data_summary summarizes the model-predicted posterior outputs into different summary statistics, including the estimated values for survival, prevalence and the proportion of sicker individuals at cycles 10, 20 and 30.

data_summary()

Summarize posterior output

05a Probabilistic analysis

In this subcomponent, decision uncertainty is evaluated by propagating the uncertainty through the CEA using probabilistic sensitivity analysis (PSA). The function generate_psa_params generates a PSA dataset for all the CEA input parameters.

generate_psa_params()

Generate PSA dataset of CEA parameters

05b Deterministic analysis

This subcomponent performs a deterministic CEA, followed by some deterministic sensitivity analysis, including one-way, two-way and tornado sensitivity analyses. The function calculate_ce_out calculates costs and effects for a given vector of parameters using a simulation model.

calculate_ce_out()

Calculate cost-effectiveness outcomes

owsa_det()

One-way sensitivity analysis (OWSA)

twsa_det()

Two-way sensitivity analysis (TWSA)

General

open_guide()

Open UserGuide of the package

Data

all_cause_mortality

Life table for the US in 2015

df_params_init

Base-case parameter set

SickSicker_targets

Calibration targets for the Sick-Sicker model

m_calib_post

Posterior distribution of calibrated parameters

v_calib_post_map

Maximum-a-posteriori (MAP) estimate of calibrated parameters

l_psa

PSA object of the cost-effectiveness analysis decision model