A stochastic compartmental model simulating TB transmission and progression to evaluate a novel point-of-care rapid diagnostic (tPOC-RDT) with increased rural coverage. This model is under active development and aims to inform equitable diagnostic strategies in low-resource settings.
TB_transmission_tPOC-RDT
Overview
This repository hosts a stochastic, individual-based compartmental model of tuberculosis (TB) transmission and progression, developed to evaluate the potential impact of a novel point-of-care rapid diagnostic test (tPOC-RDT) with enhanced rural diagnostic coverage. The model simulates TB dynamics under two scenarios: (1) baseline conditions reflecting current diagnostic access and delays, and (2) implementation of the tPOC-RDT.
The model utilises custom functions to transition individuals between disease states (compartments) based on calculated probabilities. It follows a stepwise method that mirrors the natural history of TB progression, with transitions repeated iteratively over the entire simulation period (in this case, 10 years). At each time step, transition probabilities are dynamically computed based on the group counts from the previous step, allowing the model to capture changes in the population structure over time.
This implementation predominantly uses base R, featuring original R code developed specifically for this project.
Model Description
The model is implemented in R and structured around seven compartments representing key states in TB infection and care:
S – Susceptible
E – Exposed (Latent infection)
P – Preclinical (non-infectious, early disease)
I – Infectious (active TB)
D – Diagnosed
T – Treated
R – Recovered
Individuals transition between these compartments according to biologically informed probabilities and rates, such as infection probability, progression rates, diagnostic rates, treatment uptake, and recovery. Stochastic transitions are modeled using Bernoulli processes applied at each daily time step.
Transition Flows Include:
Susceptible → Exposed via force of infection
Exposed → Preclinical via reactivation
Preclinical → Infectious via symptom progression
Infectious → Diagnosed via passive detection or diagnostic coverage
Diagnosed → Treated
Treated → Recovered
Recovered → Susceptible via lo …