Compartmental Model Calibration with macpan2

VanML 2024-02-22

Author

Steve Walker (McMaster University)

Acknowledgements

  • CANMOD for funding
  • Original developers were real modellers (Ben Bolker, Jonathan Dushoff, David Earn, Mike Li, Irena Papst)
  • C++ programming (Weiguang Guan, Sharcnet), model library (Jen Freeman), and product models (Darren Flynn-Primrose)
  • Amy Hurford, Lisa Kanary, Caroline Colijn, Zahra Mohammadi, Claude Nadeau, Philippe Berthiaume, Evan Mitchell, Brian Gaas
  • Irena Papst and Mike Li

Model Development Cycle

McMasterPandemic Project History

McMasterPandemic COVID-19 Model

COVID-19 Vaccination Model

Forecasting

Calibration – Trajectory Matching

  • Toy simulated data example
  • “Observed” case reports – dots
  • Model-predicted case reports – line
  • Optimize transmission rate using maximum likelihood

Examples of Usage

  • COVID-19 forecasts for agencies
    • Public Health Agency of Canada
    • Ontario Science Table
    • World Health Organization
      • South Africa – provincial and national level
      • Afro-Regional – 49 countries
    • Public Health Ontario

Examples of Usage

  • Model structures
    • Macpan modelling group’s base COVID-19 model
    • Extensions of macpan base – vaccination, VOC, and waste-water models
    • Metapopulation model of Newfoundland – 1000s of compartments
    • Endemic COVID-19 model
    • Mpox with two risk groups https://doi.org/10.1002/jmv.29256

Works on ‘Big’ Problems

  • Public Health Ontario Forecasts
  • ~100 parameters / five data-streams

SIR fit to London Scarlet Fever

SIR fit to London Scarlet Fever

Unpublished by Kevin Zhao and David Earn.

Inferred Force of Infection

Unpublished by Kevin Zhao and David Earn.

Thinking about the Interface

si = mp_tmb_model_spec(
    before = list(
        I ~ 1
      , S ~ N - I
    )
  , during = list(
        infection ~ beta * S * I / N
      , S ~ S - infection
      , I ~ I + infection
    )
  , default = list(N = 100, beta = 0.25)
)

https://canmod.github.io/macpan2/#hello-world

Software Timeline

+-----------+------+-------------------------------------------------------+
| nickname  | year | description                                           |
+-----------+------+-------------------------------------------------------+
| macpan1   | 2020 | original covid models in R engine                     |
| macpan1.5 | 2021 | fast C++ engine and flexibility for VOC modelling     |
| macpan2   | 2023 | general architecture to implement the lessons learned |
| macpan2   | 2024 | simple interface to general architecture              |
+-----------+------+-------------------------------------------------------+

Lessons – modeller needs and wants

Biologically principled

Fast simulations and calibrations

Statistically principled

Functionality-rich

Modular model building

Easy to use

Comparing Calibration Tools

Demo, Resources, Exercises