-
Notifications
You must be signed in to change notification settings - Fork 0
Model Structure, Moving Parts, and Customizable Elements
Note: for some examples, this text may refer to how individuals would move through components of the model. This is an ordinary differential equation (ODE) model, so an “individual” does not have the same definitions as in something like an agent-based model. These example individuals are just for ease of understanding and don’t imply there are individuals in the model in implementation.
The mechanistic model is a modified SEIR model with additional stratifications and partial immunity following infection. There are 3 different infection state compartments, and one bookkeeping compartment:
Susceptible: people who are not infected. This subpopulation may have varied levels of immunity, depending on infection and vaccination history. For convenience in code, we include both fully and partially susceptible individuals in this compartment, although some models would instead place previously infected individuals in a recovered or partially immune compartment. This distinction is purely sematic.
Exposed: people who are infected but not yet infectious. Note that all exposed people will eventually become infectious; this is distinct from the other common usage of “exposed” in public health (to have interacted with an infectious person, irrespective of whether transmission occurred).
Infectious: people who are infected and infectious. Our model does not at present consider varying levels of severity or behavioral responses to infection (e.g., staying home while sick, seeking hospital care).
Cumulative: a bookkeeping compartment which tracks the number of individuals who move from the susceptible to exposed compartments, i.e., the cumulative incidence of new infections.
Immunity in the model is defined by the combination of immunogenic events (infections and vaccinations) a subpopulation has experienced, and the time since the most recent immunogenic event. The ordering of these events, and the timing of events before the most recent one, do not affect the level of protection. In addition to the passing of time, immunity to a particular challenging pathogen strain may be reduced. For example, people who have been infected with strain A may have a high level of protection against reinfection by A, but modest protection against B, and perhaps even lower protection against some strain C.
In the current version of the model, only infection and vaccination can increase immunity. In the future we may add support for non-infecting exposures that boost immunity in people who are primed by previous immunogenic events.
Each of the 4 compartments is stratified in 4 different ways:
Age bin: This is a user-defined age bin that is non-overlapping and has a minimum age of 0 years old and a maximum age of 85+. All individuals older than 85 are functionally counted as 85 years old for calculations involving age.
Immune History: This represents the immune history of an individual using an integer casted binary representation. With three strains, there are 8 possible combinations (not permutations) of immune histories, calculated as 2^3. The order in which populations are infected with different viruses is not tracked.
In an example 2 strain model there would be the following immune history states.
int(00) = 0: no previous infection with either strain
int(01) = 1: A previous infection with strain 0.
int(10) = 2: A previous infection with strain 1.
int(11) = 3: a previous infection with both strain 0 and 1.
The reason immune history is stored this way is to represent an infecting strain "A" as a sequence of zeros, with a "1" in the A'th index. Individuals exposed to strain A will be moved to the immune state corresponding to a bitwise OR operation between their current immune state and the representation of strain A.
Vaccination History: an integer representing the number of vaccinations an individual has received. Maxing out at some user-defined value. Where further vaccinations do not increment the vaccination history strata
Waning Strata (Susceptible Compartment Only): This refers to the index of a waning stratum that a particular individual is in. It is used to parameterize waning curves for the combined immunity of vaccination and previous infection. The number of waning compartments and the proportion of original immunity in each compartment are specified by the user during model initialization.
Infected By Strain (Exposed, Infectious, and Cumulative Compartments Only): This refers to the index of the strain that infected the population in a specific stratum. If a susceptible individual interacts with an infectious individual carrying strain 0, and the infection is successful, the susceptible individual will be moved to the exposed compartment. In this process, their waning strata dimension will be replaced with the infected strain index dimension, with a value of 0. The waning stratum is replaced as the waning status of an individual is only used to calculate the likelihood of infection, and is not used after the fact.
The basic mechanistic model assumes four fundamental compartments in the model. Modifying these compartments by adding or removing them would require rewiring transmission dynamics, initialization procedures, and configuration scripts. It is strongly advised not to attempt adding or removing a compartment, but rather to modify the transmission dynamics to achieve desired results.
In the forward-facing documentation of the model, you may come across references to the "P" (partially immune) compartment as a way of tracking immunity. However, in the back-end implementation, the "P" compartment does not exist. Fully susceptible individuals are only a subset of individuals in the "S" (susceptible) compartment whose immune state is 0, indicating no prior exposure. All individuals in the Susceptible compartment can be infected but to varying degrees based on their immune history, vaccination status, and waning status.
The Exposed and Infected compartments function similarly to those in other ODE mechanistic models. Additionally, for traceability purposes, there is a hidden cumulative compartment called "C" that tracks all infections in the model. Whenever an individual enters the exposed state, they are added to the C compartment. The cumulative compartment has no outflow, meaning its population can exceed the total population of the model assuming enough infections occur. Therefore, it should be used for metrics such as incidence and cumulative infections.
This model assumes, in many places, a 4-dimensional compartment. In the case of A Susceptible compartment, the schema is assumed to be age bin, immune history, vaccination status, and waning. For Exposed and Infected compartments, the waning dimension is unused, as waning is only used to calculate the relative protection against infection, so it is replaced with an “infected by” dimension, indicating what strain the individuals are currently exposed or infected with.