knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

This document explains how to run the cost-effectiveness model in the LTBIscreeningproject R package. There are a large number of files in this package but many of them are not essential to running the model. They are for model checking or plotting of outputs. Scripts are in ./scripts/ and functions are in ./R/.

Top-level

The model running consists of scripts (which can be sourced) and functions (which are available when the package is loaded). The highest level script is 000-programme-level-params-scenario-runner.R This simply loads required packages, input values and then runs the model using run_model().

Before this can be done though, we need to prepare the input values using create_input_workspace.R.

Create input workspace

There are 2 terms used to define a model run. They are ordered in terms of if and how they are modified between model runs.

Therefore, the script create_input_workspace.R

run_model() and run_policy()

run_model() is a wrapper for run_policy(), iterating over all policies. run_policy() has these main steps:

1. Set-up

  1. Define output folders, with setup_folders()

  2. The specific policy and intervention values are loaded in to the workspace and the cohort modified accordingly in data-prep_constants-policy.R, using policy_interv() and policy_cohort()

  3. The particular intervention and policy probability, cost and health state value are substitutes in to the screening decision tree using prep-decisiontree.R.

2. Modelling

  1. parallel_decision_tree() is the parallelised wrapper around the cost-effectiveness calculations for a decision tree decision_tree_cluster().

  2. The output of decision_tree_cluster() includes the probability of an LTBI individual being successfully treated to cured. This is used in activetb_qaly_cost() which calculates the population QALYs and costs due to active TB.

  3. The costs and QALYs from the decision tree model and the population model are combined to give a total cost-effectiveness using combine_popmod_dectree_res().

3. Post-processing

  1. The combined output data are plotted using plots_and_tables_scenarios().


n8thangreen/ltbiScreenLite documentation built on May 28, 2020, 9:37 p.m.