This is a basic example of how to use the LTBI screening model. Other vignettes will show how to then automate some of the running over multiple scenarios, and how to visualised the output.
Assume that everyone who enters the country doesn’t leave.
force_everyone_stays <- FALSE
Do we include the QALY loss or costs of individuals who leave EWNI but then progress to active TB? If yes then we follow them to death rather than time of exit.
ENDPOINT_QALY <- "death"
ENDPOINT_cost <- "death"
Rather than offer screening to everyone immediately on entry, assume that we screen at a uniformly random time 0-5 years from entry.
screen_with_delay <- TRUE
MAX_SCREEN_DELAY <- 5
Time horizon for active TB progression
FUP_MAX_YEAR <- 100
screen_age_range <- 18:45
We pick a single year cohort to simulate from. The year 2012 is the most recent complete year but we’ll use the largest.
year_cohort <- '2009'
Which incidence in country of origin group to target for screening
incidence_grps_screen <- c("(0,50]", "(50,150]", "(150,250]", "(250,350]", "(350,1e+05]")
What minimum duration in EWNI should someone have to be eligible for screening as a number or implictly on student status
min_screen_length_of_stay <- 0
no_students = FALSE
Computation options for number of Monte-Carlo iterations and whether to use the DIDE cluster to run the model
N.mc = 100,
cluster = FALSE,
This specification we’ll call an intervention (in contrast to a scenario which are the lower level variables) and can be loaded as a list using
data("intervention_constants")
We’ll show later how to simulate over multiple scenarios but here we’ll take the simplest case of a single scenario. For a given intervention (e.g. for QFT-GIT test and 3 months Rifampicin-Isoniazid treatment), we can load the different scenarios as a list:
data("scenario_parameters", package = "LTBIscreeningproject")
Each scenario’s set of values are given in a long format tibble, such as the following.
scenario_parameters[[1]]
#> node min max distn scenario val_type p
#> 1 Agree to Screen 20 20 unif 1 cost NA
#> 2 Complete Treatment 396 396 unif 1 cost NA
#> 3 Not Complete Treatment 66 66 unif 1 cost NA
#> 4 Start Treatment NA NA <NA> 1 QALYloss 0.60
#> 5 Complete Treatment NA NA <NA> 1 QALYloss 0.60
#> 6 Agree to Screen NA NA <NA> 1 QALYloss 0.60
#> 7 Effective NA NA <NA> 1 QALYloss 0.60
#> 8 Sensitivity NA NA <NA> 1 QALYloss 0.84
#> 9 Specificity NA NA <NA> 1 QALYloss 0.99
#> 10 Not Start Treatment NA NA <NA> 1 QALYloss 0.40
#> 11 Not Complete Treatment NA NA <NA> 1 QALYloss 0.40
#> 12 Not Agree to Screen NA NA <NA> 1 QALYloss 0.40
#> 13 Not Effective NA NA <NA> 1 QALYloss 0.40
#> 14 1 - Sensitivity NA NA <NA> 1 QALYloss 0.16
#> 15 1 - Specificity NA NA <NA> 1 QALYloss 0.01
node
are the names of the nodes on the decision tree i.e. the steps along the screening, diagnosis and treatment pathway.distn
, min
, max
specify the distibutions for whichever parameter is indicated.scenario
in this case is superfluous.val_type
indicates the paramter type i.e. is it cost or some health indicator. (QALYloss
is not a good name! Need to change. This should really be p
and we have another label for health.)p
is the probability. If we rename the val_types
then we can get rid of this column.Read-in the cleaned individual-level study. This is in accordance with the fixed model parameters above.
data("sample_cleaned")
Data cleaning removes some entries and we also create new fields from the existing ones which we’ll need later on.
The data objects are created in the following script.
source("scripts/01b-data-prep_cost-effectiveness.R", echo = TRUE)
The data are created with the date of the original and the discounted or inflated date as well as the reference from where it came.
Where available the parameter values are given as distibutions and their (hyper-)parameters. The data can be loaded using:
data("cost_effectivness_params", package = "LTBIscreeningproject")
This includes:
cfr_age_lookup
#> age cfr distn a b
#> [15,45) [15,45) 0.012 beta NA NA
#> [45,65) [45,65) 0.048 beta NA NA
#> [65,200) [65,200) 0.176 beta NA NA
unit_cost
#> $vomiting
#> [1] 65.205
#> attr(,"from_year")
#> [1] 2015
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 63
#> attr(,"reference")
#> [1] "Jit & White (2015). NHS Reference costs (Curtis 2013)"
#>
#> $hepatotoxicity
#> [1] 607.545
#> attr(,"from_year")
#> [1] 2015
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 587
#> attr(,"reference")
#> [1] "Jit & White (2015). Pareek et al. (2011)"
#>
#> $LFT_test
#> [1] 2.982451
#> attr(,"from_year")
#> [1] 2013
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 2.69
#> attr(,"reference")
#> [1] "Lilford (2013)"
#>
#> $hep_test
#> [1] 28.18361
#> attr(,"from_year")
#> [1] 2013
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 25.42
#> attr(,"reference")
#> [1] "Lilford (2013)"
#>
#> $HIV_test
#> [1] 9.50149
#> attr(,"from_year")
#> [1] 2011
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 8
#> attr(,"reference")
#> [1] "Health Protection Agency (2011)"
#>
#> $LTBI_Tx
#> [1] 682.363
#> attr(,"from_year")
#> [1] 2006
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 483.74
#> attr(,"reference")
#> [1] "HTA VOLUME 20, ISSUE 38, MAY 2016, ISSN 1366-527, p.8"
#>
#> $LTBI_Tx_6mISO
#> [1] 549.585
#> attr(,"from_year")
#> [1] 2015
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 531
#> attr(,"reference")
#> [1] "Jit & White (2015)"
#>
#> $LTBI_Tx_3mISORIF
#> [1] 409.86
#> attr(,"from_year")
#> [1] 2015
#> attr(,"to_year")
#> [1] 2016
#> attr(,"from_cost")
#> [1] 396
#> attr(,"reference")
#> [1] "Jit & White (2015)"
#>
#> $aTB_TxDx
#> $aTB_TxDx$culture
#> $aTB_TxDx$culture$distn
#> [1] "gamma"
#>
#> $aTB_TxDx$culture$params
#> shape scale
#> 100.0000000 0.2307015
#>
#>
#> $aTB_TxDx$xray
#> $aTB_TxDx$xray$distn
#> [1] "pert"
#>
#> $aTB_TxDx$xray$params
#> mode min max
#> 41.56902 30.00000 50.00000
#>
#>
#> $aTB_TxDx$smear
#> $aTB_TxDx$smear$distn
#> [1] "gamma"
#>
#> $aTB_TxDx$smear$params
#> shape scale
#> 106.00000000 0.08035896
#>
#>
#> $aTB_TxDx$first_visit
#> $aTB_TxDx$first_visit$distn
#> [1] "gamma"
#>
#> $aTB_TxDx$first_visit$params
#> shape scale
#> 53.30 4.52
#>
#>
#> $aTB_TxDx$followup_visit
#> $aTB_TxDx$followup_visit$distn
#> [1] "gamma"
#>
#> $aTB_TxDx$followup_visit$params
#> shape scale
#> 18.78 7.62
#>
#>
#> $aTB_TxDx$LFT_test
#> $aTB_TxDx$LFT_test$distn
#> [1] "unif"
#>
#> $aTB_TxDx$LFT_test$params
#> min max
#> 2.982451 2.982451
#>
#>
#> $aTB_TxDx$aTB_Tx
#> $aTB_TxDx$aTB_Tx$distn
#> [1] "gamma"
#>
#> $aTB_TxDx$aTB_Tx$params
#> shape scale
#> 8.3330 661.8883
utility
#> $falsepos_Tx
#> [1] 0.9
#>
#> $disease_free
#> [1] 1
#>
#> $activeTB
#> [1] 0.82
QALYloss
#> $activeTB
#> [1] 0.4
#>
#> $falseposLTBI_adverse
#> [1] 8e-04
#>
#> $falsepos_activeTB_Tx
#> [1] 0.03
NUM_SECONDARY_INF
#> $distn
#> [1] "pert"
#>
#> $params
#> mode min max
#> 0.20 0.10 0.31
Pareek, Manish, I. Abubakar, Peter J. White, G. P. Garnette, and A. Lalvani. 2011. “Tuberculosis screening of migrants to low-burden nations: Insights from evaluation of UK practice.” European Respiratory Journal 37 (5): 1175–82. doi:10.1183/09031936.00105810.