# Compartmental models in epidemiology

Compartmental models simplify the mathematical modelling of infectious diseases. The population is assigned to compartments with labels - for example, S, I, or R, (Susceptible, Infectious, or Recovered). People may progress between compartments. The order of the labels usually shows the flow patterns between the compartments; for example SEIS means susceptible, exposed, infectious, then susceptible again.

The origin of such models is the early 20th century, with an important work being that of Kermack and McKendrick in 1927.[1]

The models are most often run with ordinary differential equations (which are deterministic), but can also be used with a stochastic (random) framework, which is more realistic but much more complicated to analyze.

Models try to predict things such as how a disease spreads, or the total number infected, or the duration of an epidemic, and to estimate various epidemiological parameters such as the reproductive number. Such models can show how different public health interventions may affect the outcome of the epidemic, e.g., what the most efficient technique is for issuing a limited number of vaccines in a given population.

## The SIR model

The SIR model is one of the simplest compartmental models, and many models are derivatives of this basic form. The model consists of three compartments: S for the number of susceptible, I for the number of infectious, and R for the number of recovered or deceased (or immune) individuals. (This compartment may also be called "resistant" or "removed.") This model is reasonably predictive[citation needed] for infectious diseases that are transmitted from human to human, and where recovery confers lasting resistance, such as measles, mumps and rubella.

Spatial SIR model simulation. Each cell can infect its eight immediate neighbors.

These variables (S, I, and R) represent the number of people in each compartment at a particular time. To represent that the number of susceptible, infectious and removed individuals may vary over time (even if the total population size remains constant), we make the precise numbers a function of t (time): S(t), I(t) and R(t). For a specific disease in a specific population, these functions may be worked out in order to predict possible outbreaks and bring them under control.

### The SIR model is dynamic in three senses

As implied by the variable function of t, the model is dynamic in that the numbers in each compartment may fluctuate over time. The importance of this dynamic aspect is most obvious in an endemic disease with a short infectious period, such as measles in the UK prior to the introduction of a vaccine in 1968. Such diseases tend to occur in cycles of outbreaks due to the variation in number of susceptibles (S(t)) over time. During an epidemic, the number of susceptible individuals falls rapidly as more of them are infected and thus enter the infectious and removed compartments. The disease cannot break out again until the number of susceptibles has built back up, e.g. as a result of offspring being born into the susceptible compartment.

Yellow=Susceptible, Maroon=Infectious, Teal=Recovered

Each member of the population typically progresses from susceptible to infectious to removed. This can be shown as a flow diagram in which the boxes represent the different compartments and the arrows the transition between compartments, i.e.

### Transition rates

For the full specification of the model, the arrows should be labeled with the transition rates between compartments. Between S and I, the transition rate is d(S/N)/dt = βSI/N2, where N is the total population, β is the average number of contacts per person per time, multiplied by the probability of disease transmission in a contact between a susceptible and an infectious subject, and SI/N2 is the fraction of those contacts between an infectious and susceptible individual which result in the susceptible person becoming infected. (This is very similar to the law of mass action in chemistry in which random collisions between molecules result in a chemical reaction and the fractional rate is proportional to the concentration of the two reactants).

Between I and R, the transition rate is assumed to be proportional to the number of infectious individuals which is γI. This will not only be the number who have recovered and acquired immunity, but the number of deaths as well. If an individual is infectious for a time period D, then γ = 1/D.

It is assumed that the permanence of each single subject in the epidemic states is a random variable with exponential distribution. More complex and realistic distributions (such as Erlang distribution) can be equally used with few modifications.

## Bio-mathematical deterministic treatment of the SIR model

### The SIR model without vital dynamics

The dynamics of an epidemic, for example, the flu, are often much faster than the dynamics of birth and death, therefore, birth and death are often omitted in simple compartmental models. The SIR system without so-called vital dynamics (birth and death, sometimes called demography) described above can be expressed by the following set of ordinary differential equations:[2]

{\displaystyle {\begin{aligned}&{\frac {dS}{dt}}=-{\frac {\beta IS}{N}},\\[6pt]&{\frac {dI}{dt}}={\frac {\beta IS}{N}}-\gamma I,\\[6pt]&{\frac {dR}{dt}}=\gamma I,\end{aligned}}}

where ${\displaystyle S}$ is the stock of susceptible population, ${\displaystyle I}$ is the stock of infected, ${\displaystyle R}$ is the stock of removed population (either by death or recovery), and ${\displaystyle N}$ is the sum of these three.

This model was for the first time proposed by William Ogilvy Kermack and Anderson Gray McKendrick as a special case of what we now call Kermack–McKendrick theory, and followed work McKendrick had done with Ronald Ross.

This system is non-linear, however it is possible to derive its analytic solution in implicit form.[3] Other numerical tools include Monte Carlo methods, such as the Gillespie algorithm.

Firstly note that from:

${\displaystyle {\frac {dS}{dt}}+{\frac {dI}{dt}}+{\frac {dR}{dt}}=0,}$

it follows that:

${\displaystyle S(t)+I(t)+R(t)={\text{constant}}=N,}$

expressing in mathematical terms the constancy of population ${\displaystyle N}$. Note that the above relationship implies that one need only study the equation for two of the three variables.

Secondly, we note that the dynamics of the infectious class depends on the following ratio:

${\displaystyle R_{0}={\frac {\beta }{\gamma }},}$

the so-called basic reproduction number (also called basic reproduction ratio). This ratio is derived as the expected number of new infections (these new infections are sometimes called secondary infections) from a single infection in a population where all subjects are susceptible.[4][5] This idea can probably be more readily seen if we say that the typical time between contacts is ${\displaystyle T_{c}=\beta ^{-1}}$, and the typical time until removal is ${\displaystyle T_{r}=\gamma ^{-1}}$. From here it follows that, on average, the number of contacts by an infectious individual with others before the infectious has been removed is: ${\displaystyle T_{r}/T_{c}.}$

By dividing the first differential equation by the third, separating the variables and integrating we get

${\displaystyle S(t)=S(0)e^{-R_{0}(R(t)-R(0))/N},}$

where ${\displaystyle S(0)}$ and ${\displaystyle R(0)}$ are the initial numbers of, respectively, susceptible and removed subjects. Writing ${\displaystyle s_{0}=S(0)/N}$ for the initial proportion of susceptible individuals, and ${\displaystyle s_{\infty }=S(\infty )/N}$ and ${\displaystyle r_{\infty }=R(\infty )/N}$ for the proportion of susceptible and removed individuals respectively in the limit ${\displaystyle t\to \infty ,}$ one has

${\displaystyle s_{\infty }=1-r_{\infty }=s_{0}e^{-R_{0}(r_{\infty }-r_{0})}}$

(note that the infectious compartment empties in this limit). This transcendental equation has a solution in terms of the Lambert W function,[6] namely

${\displaystyle s_{\infty }=1-r_{\infty }=-R_{0}^{-1}\,W(-s_{0}R_{0}e^{-R_{0}(1-r_{0})}).}$

This shows that at the end of an epidemic, unless ${\displaystyle s_{0}=0}$, not all individuals of the population have been removed, so some must remain susceptible. This means that the end of an epidemic is caused by the decline in the number of infectious individuals rather than an absolute lack of susceptible subjects.

The role of the basic reproduction number is extremely important. In fact, upon rewriting the equation for infectious individuals as follows:

${\displaystyle {\frac {dI}{dt}}=\left(R_{0}{\frac {S}{N}}-1\right)\gamma I,}$

it yields that if:

${\displaystyle R_{0}>{\frac {N}{S(0)}},}$

then:

${\displaystyle {\frac {dI}{dt}}(0)>0,}$

i.e., there will be a proper epidemic outbreak with an increase of the number of the infectious (which can reach a considerable fraction of the population). On the contrary, if

${\displaystyle R_{0}<{\frac {N}{S(0)}},}$

then

${\displaystyle {\frac {dI}{dt}}(0)<0,}$

i.e., independently from the initial size of the susceptible population the disease can never cause a proper epidemic outbreak. As a consequence, it is clear that the basic reproduction number is extremely important.

### The force of infection

Note that in the above model the function:

${\displaystyle F=\beta I,}$

models the transition rate from the compartment of susceptible individuals to the compartment of infectious individuals, so that it is called the force of infection. However, for large classes of communicable diseases it is more realistic to consider a force of infection that does not depend on the absolute number of infectious subjects, but on their fraction (with respect to the total constant population ${\displaystyle N}$):

${\displaystyle F=\beta {\frac {I}{N}}.}$

Capasso and, afterwards, other authors have proposed nonlinear forces of infection to model more realistically the contagion process.

### Exact analytical solutions to the SIR model

In 2014, Harko and coauthors derived an exact analytical solution to the SIR model.[3] In the case without vital dynamics setup, for ${\displaystyle {\mathcal {S}}(u)=S(t)}$, etc., it corresponds to the following time parametrization

${\displaystyle {\mathcal {S}}(u)=S(0)u}$
${\displaystyle {\mathcal {I}}(u)=N-{\mathcal {R}}(u)-{\mathcal {S}}(u)}$
${\displaystyle {\mathcal {R}}(u)=R(0)-\rho \ln(u)}$

for

${\displaystyle t={\frac {N}{\beta }}\int _{u}^{1}{\frac {du^{*}}{u^{*}{\mathcal {I}}(u^{*})}},\quad \rho ={\frac {\gamma N}{\beta }},}$

with initial conditions

${\displaystyle ({\mathcal {S}}(1),{\mathcal {I}}(1),{\mathcal {R}}(1))=(S(0),N-R(0)-S(0),R(0)),\quad u_{T}

where ${\displaystyle u_{T}}$ satisfies ${\displaystyle {\mathcal {I}}(u_{T})=0}$. By the transcendental equation for ${\displaystyle R_{\infty }}$ above, it follows that ${\displaystyle u_{T}=e^{-(R_{\infty }-R(0))/\rho }(=S_{\infty }/S(0)}$, if ${\displaystyle S(0)\neq 0)}$ and ${\displaystyle I_{\infty }=0}$.

An equivalent analytical solution found by Miller[7][8] yields

{\displaystyle {\begin{aligned}S(t)&=S(0)e^{-\xi (t)}\\[8pt]I(t)&=N-S(t)-R(t)\\[8pt]R(t)&=R(0)+\rho \xi (t)\\[8pt]\xi (t)&={\frac {\beta }{N}}\int _{0}^{t}I(t^{*})\,dt^{*}\end{aligned}}}

Here ${\displaystyle \xi (t)}$ can be interpreted as the expected number of transmissions an individual has received by time ${\displaystyle t}$. The two solutions are related by ${\displaystyle e^{-\xi (t)}=u}$.

Effectively the same result can be found in the original work by Kermack and McKendrick.[1]

These solutions may be easily understood by noting that all of the terms on the right-hand sides of the original differential equations are proportional to ${\displaystyle I}$. The equations may thus be divided through by ${\displaystyle I}$, and the time rescaled so that the differential operator on the left-hand side becomes simply ${\displaystyle d/d\tau }$, where ${\displaystyle d\tau =Idt}$, i.e. ${\displaystyle \tau =\int Idt}$. The differential equations are now all linear, and the third equation, of the form ${\displaystyle dR/d\tau =}$ const., shows that ${\displaystyle \tau }$ and ${\displaystyle R}$ (and ${\displaystyle \xi }$ above) are simply linearly related.

### The SIR model with vital dynamics and constant population

Consider a population characterized by a death rate ${\displaystyle \mu }$ and birth rate ${\displaystyle \Lambda }$, and where a communicable disease is spreading. The model with mass-action transmission is:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\Lambda -\mu S-{\frac {\beta IS}{N}}\\[8pt]{\frac {dI}{dt}}&={\frac {\beta IS}{N}}-\gamma I-\mu I\\[8pt]{\frac {dR}{dt}}&=\gamma I-\mu R\end{aligned}}}

for which the disease-free equilibrium (DFE) is:

${\displaystyle \left(S(t),I(t),R(t)\right)=\left({\frac {\Lambda }{\mu }},0,0\right).}$

In this case, we can derive a basic reproduction number:

${\displaystyle R_{0}={\frac {\beta \Lambda }{\mu (\mu +\gamma )}},}$

which has threshold properties. In fact, independently from biologically meaningful initial values, one can show that:

${\displaystyle R_{0}\leq 1\Rightarrow \lim _{t\to \infty }(S(t),I(t),R(t))={\textrm {DFE}}=\left({\frac {\Lambda }{\mu }},0,0\right)}$
${\displaystyle R_{0}>1,I(0)>0\Rightarrow \lim _{t\to \infty }(S(t),I(t),R(t))={\textrm {EE}}=\left({\frac {\gamma +\mu }{\beta }},{\frac {\mu }{\beta }}\left(R_{0}-1\right),{\frac {\gamma }{\beta }}\left(R_{0}-1\right)\right).}$

The point EE is called the Endemic Equilibrium (the disease is not totally eradicated and remains in the population). With heuristic arguments, one may show that ${\displaystyle R_{0}}$ may be read as the average number of infections caused by a single infectious subject in a wholly susceptible population, the above relationship biologically means that if this number is less than or equal to one the disease goes extinct, whereas if this number is greater than one the disease will remain permanently endemic in the population.

## The SIS model

Yellow=Susceptible, Maroon=Infected

Some infections, for example, those from the common cold and influenza, do not confer any long-lasting immunity. Such infections do not give immunity upon recovery from infection, and individuals become susceptible again.

We have the model:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=-{\frac {\beta SI}{N}}+\gamma I\\[6pt]{\frac {dI}{dt}}&={\frac {\beta SI}{N}}-\gamma I\end{aligned}}}

Note that denoting with N the total population it holds that:

${\displaystyle {\frac {dS}{dt}}+{\frac {dI}{dt}}=0\Rightarrow S(t)+I(t)=N}$.

It follows that:

${\displaystyle {\frac {dI}{dt}}=(\beta -\gamma )I-{\frac {\beta }{N}}I^{2}}$,

i.e. the dynamics of infectious is ruled by a logistic function, so that ${\displaystyle \forall I(0)>0}$:

{\displaystyle {\begin{aligned}&{\frac {\beta }{\gamma }}\leq 1\Rightarrow \lim _{t\to +\infty }I(t)=0,\\[6pt]&{\frac {\beta }{\gamma }}>1\Rightarrow \lim _{t\to +\infty }I(t)=\left(1-{\frac {\gamma }{\beta }}\right)N.\end{aligned}}}

It is possible to find an analytical solution to this model (by making a transformation of variables: ${\displaystyle I=y^{-1}}$ and substituting this into the mean-field equations),[9] such that the basic reproduction rate is greater than unity. The solution is given as

${\displaystyle I(t)={\frac {I_{\infty }}{1+Ve^{-\chi t}}}}$.

where ${\displaystyle I_{\infty }=(1-\gamma /\beta )N}$ is the endemic infectious population, ${\displaystyle \chi =\beta -\gamma }$, and ${\displaystyle V=I_{\infty }/I_{0}-1}$. As the system is assumed to be closed, the susceptible population is then ${\displaystyle S(t)=N-I(t)}$.

As a special case, one obtains the usual logistic function by assuming ${\displaystyle \gamma =0}$. This can be also considered in the SIR model with ${\displaystyle R=0}$, i.e. no removal will take place. That is the SI model.[10] The differential equation system using ${\displaystyle S=N-I}$ thus reduces to:

${\displaystyle {\frac {dI}{dt}}\propto I\cdot (N-I).}$

In the long run, in this model, all individuals will become infected.

## Elaborations on the basic SIR model

### The SIRD model

Diagram of the SIRD model with initial values ${\displaystyle S(0)=997,I(0)=3,R(0)=0}$ and the rates for infection ${\displaystyle \beta =0.4}$, recovery ${\displaystyle \gamma =0.035}$ and mortality ${\displaystyle \mu =0.005}$
Animation of the SIRD model with initial values ${\textstyle S(0)=997,I(0)=3,R(0)=0}$, initial rate for infection ${\textstyle \beta =0.5}$ and constant rates for recovery ${\textstyle \gamma =0.035}$ and mortality ${\textstyle \mu =0.005}$. If there is neither medicine nor vaccination available, it is only possible to reduce the infection rate (often referred to as „flattening the curve“) by appropriate measures (e. g. „social distancing“). This animation shows the impact of reducing the infection rate by 76 % (from ${\textstyle \beta =0.5}$ down to ${\textstyle \beta =0.12}$).

The Susceptible-Infectious-Recovered-Deceased-Model differentiates between Recovered (meaning specifically individuals having survived the disease and now immune) and Deceased.[11] This model uses the following system of differential equations:

{\displaystyle {\begin{aligned}&{\frac {dS}{dt}}=-{\frac {\beta IS}{N}},\\[6pt]&{\frac {dI}{dt}}={\frac {\beta IS}{N}}-\gamma I-\mu I,\\[6pt]&{\frac {dR}{dt}}=\gamma I,\\[6pt]&{\frac {dD}{dt}}=\mu I,\end{aligned}}}

where ${\displaystyle \beta ,\gamma ,\mu }$ are the rates of infection, recovery, and mortality, respectively.[12]

### The MSIR model

For many infections, including measles, babies are not born into the susceptible compartment but are immune to the disease for the first few months of life due to protection from maternal antibodies (passed across the placenta and additionally through colostrum). This is called passive immunity. This added detail can be shown by including an M class (for maternally derived immunity) at the beginning of the model

To indicate this mathematically, an additional compartment is added, M(t). This results in the following differential equations:

{\displaystyle {\begin{aligned}{\frac {dM}{dT}}&=\Lambda -\delta M-\mu M\\[8pt]{\frac {dS}{dT}}&=\delta M-{\frac {\beta SI}{N}}-\mu S\\[8pt]{\frac {dI}{dT}}&={\frac {\beta SI}{N}}-\gamma I-\mu I\\[8pt]{\frac {dR}{dT}}&=\gamma I-\mu R\end{aligned}}}

### Carrier state

Some people who have had an infectious disease such as tuberculosis never completely recover and continue to carry the infection, whilst not suffering the disease themselves. They may then move back into the infectious compartment and suffer symptoms (as in tuberculosis) or they may continue to infect others in their carrier state, while not suffering symptoms. The most famous example of this is probably Mary Mallon, who infected 22 people with typhoid fever. The carrier compartment is labelled C.

### The SEIR model

For many important infections, there is a significant incubation period during which individuals have been infected but are not yet infectious themselves. During this period the individual is in compartment E (for exposed).

Assuming that the incubation period is a random variable with exponential distribution with parameter ${\displaystyle a}$ (i.e. the average incubation period is ${\displaystyle a^{-1}}$), and also assuming the presence of vital dynamics with birth rate ${\displaystyle \Lambda }$ equal to death rate ${\displaystyle \mu }$, we have the model:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\mu N-\mu S-\beta {\frac {I}{N}}S\\[8pt]{\frac {dE}{dt}}&=\beta {\frac {I}{N}}S-(\mu +a)E\\[8pt]{\frac {dI}{dt}}&=aE-(\gamma +\mu )I\\[8pt]{\frac {dR}{dt}}&=\gamma I-\mu R.\end{aligned}}}

We have ${\displaystyle S+E+I+R=N,}$ but this is only constant because of the (degenerate) assumption that birth and death rates are equal; in general ${\displaystyle N}$ is a variable.

For this model, the basic reproduction number is:

${\displaystyle R_{0}={\frac {a}{\mu +a}}{\frac {\beta }{\mu +\gamma }}.}$

Similarly to the SIR model, also, in this case, we have a Disease-Free-Equilibrium (N,0,0,0) and an Endemic Equilibrium EE, and one can show that, independently from biologically meaningful initial conditions

${\displaystyle \left(S(0),E(0),I(0),R(0)\right)\in \left\{(S,E,I,R)\in [0,N]^{4}:S\geq 0,E\geq 0,I\geq 0,R\geq 0,S+E+I+R=N\right\}}$

it holds that:

${\displaystyle R_{0}\leq 1\Rightarrow \lim _{t\to +\infty }\left(S(t),E(t),I(t),R(t)\right)=DFE=(N,0,0,0),}$
${\displaystyle R_{0}>1,I(0)>0\Rightarrow \lim _{t\to +\infty }\left(S(t),E(t),I(t),R(t)\right)=EE.}$

In case of periodically varying contact rate ${\displaystyle \beta (t)}$ the condition for the global attractiveness of DFE is that the following linear system with periodic coefficients:

{\displaystyle {\begin{aligned}{\frac {dE_{1}}{dt}}&=\beta (t)I_{1}-(\gamma +a)E_{1}\\[8pt]{\frac {dI_{1}}{dt}}&=aE_{1}-(\gamma +\mu )I_{1}\end{aligned}}}

is stable (i.e. it has its Floquet's eigenvalues inside the unit circle in the complex plane).

### The SEIS model

The SEIS model is like the SEIR model (above) except that no immunity is acquired at the end.

${\displaystyle {\color {blue}{{\mathcal {S}}\to {\mathcal {E}}\to {\mathcal {I}}\to {\mathcal {S}}}}}$

In this model an infection does not leave any immunity thus individuals that have recovered return to being susceptible, moving back into the S(t) compartment. The following differential equations describe this model:

{\displaystyle {\begin{aligned}{\frac {dS}{dT}}&=\Lambda -{\frac {\beta SI}{N}}-\mu S+\gamma I\\[6pt]{\frac {dE}{dT}}&={\frac {\beta SI}{N}}-(\epsilon +\mu )E\\[6pt]{\frac {dI}{dT}}&=\varepsilon E-(\gamma +\mu )I\end{aligned}}}

### The MSEIR model

For the case of a disease, with the factors of passive immunity, and a latency period there is the MSEIR model.

${\displaystyle \color {blue}{{\mathcal {M}}\to {\mathcal {S}}\to {\mathcal {E}}\to {\mathcal {I}}\to {\mathcal {R}}}}$
{\displaystyle {\begin{aligned}{\frac {dM}{dT}}&=\Lambda -\delta M-\mu M\\[6pt]{\frac {dS}{dT}}&=\delta M-{\frac {\beta SI}{N}}-\mu S\\[6pt]{\frac {dE}{dT}}&={\frac {\beta SI}{N}}-(\varepsilon +\mu )E\\[6pt]{\frac {dI}{dT}}&=\varepsilon E-(\gamma +\mu )I\\[6pt]{\frac {dR}{dT}}&=\gamma I-\mu R\end{aligned}}}

### The MSEIRS model

An MSEIRS model is similar to the MSEIR, but the immunity in the R class would be temporary, so that individuals would regain their susceptibility when the temporary immunity ended.

${\displaystyle {\color {blue}{{\mathcal {M}}\to {\mathcal {S}}\to {\mathcal {E}}\to {\mathcal {I}}\to {\mathcal {R}}\to {\mathcal {S}}}}}$

### Variable contact rates and pluriannual or chaotic epidemics

It is well known that the probability of getting a disease is not constant in time. Some diseases are seasonal, such as the common cold viruses, which are more prevalent during winter. With childhood diseases, such as measles, mumps, and rubella, there is a strong correlation with the school calendar, so that during the school holidays the probability of getting such a disease dramatically decreases.

As a consequence, for many classes of diseases, one should consider a force of infection with periodically ('seasonal') varying contact rate

${\displaystyle F=\beta (t){\frac {I}{N}},\quad \beta (t+T)=\beta (t)}$

with period T equal to one year.

Thus, our model becomes

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\mu N-\mu S-\beta (t){\frac {I}{N}}S\\[8pt]{\frac {dI}{dt}}&=\beta (t){\frac {I}{N}}S-(\gamma +\mu )I\end{aligned}}}

(the dynamics of recovered easily follows from ${\displaystyle R=N-S-I}$), i.e. a nonlinear set of differential equations with periodically varying parameters. It is well known that this class of dynamical systems may undergo very interesting and complex phenomena of nonlinear parametric resonance. It is easy to see that if:

${\displaystyle {\frac {1}{T}}\int _{0}^{T}{\frac {\beta (t)}{\mu +\gamma }}\,dt<1\Rightarrow \lim _{t\to +\infty }(S(t),I(t))=DFE=(N,0),}$

whereas if the integral is greater than one the disease will not die out and there may be such resonances. For example, considering the periodically varying contact rate as the 'input' of the system one has that the output is a periodic function whose period is a multiple of the period of the input. This allowed to give a contribution to explain the poly-annual (typically biennial) epidemic outbreaks of some infectious diseases as interplay between the period of the contact rate oscillations and the pseudo-period of the damped oscillations near the endemic equilibrium. Remarkably, in some cases, the behavior may also be quasi-periodic or even chaotic.

## Modelling vaccination

The SIR model can be modified to model vaccination. Typically these introduce an additional compartment to the SIR model, ${\displaystyle V}$, for vaccinated individuals.[citation needed] Below are some examples.

### Vaccinating newborns

In presence of a communicable diseases, one of main tasks is that of eradicating it via prevention measures and, if possible, via the establishment of a mass vaccination program. Consider a disease for which the newborn are vaccinated (with a vaccine giving lifelong immunity) at a rate ${\displaystyle P\in (0,1)}$:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\mu N(1-P)-\mu S-\beta {\frac {I}{N}}S\\[8pt]{\frac {dI}{dt}}&=\beta {\frac {I}{N}}S-(\mu +\gamma )I\\[8pt]{\frac {dV}{dt}}&=\mu NP-\mu V\end{aligned}}}

where ${\displaystyle V}$ is the class of vaccinated subjects. It is immediate to show that:

${\displaystyle \lim _{t\to +\infty }V(t)=NP,}$

thus we shall deal with the long term behavior of ${\displaystyle S}$ and ${\displaystyle I}$, for which it holds that:

${\displaystyle R_{0}(1-P)\leq 1\Rightarrow \lim _{t\to +\infty }\left(S(t),I(t)\right)=DFE=\left(N\left(1-P\right),0\right)}$
${\displaystyle R_{0}(1-P)>1,\quad I(0)>0\Rightarrow \lim _{t\to +\infty }\left(S(t),I(t)\right)=EE=\left({\frac {N}{R_{0}(1-P)}},N\left(R_{0}(1-P)-1\right)\right).}$

In other words, if

${\displaystyle P

the vaccination program is not successful in eradicating the disease, on the contrary, it will remain endemic, although at lower levels than the case of absence of vaccinations. This means that the mathematical model suggests that for a disease whose basic reproduction number may be as high as 18 one should vaccinate at least 94.4% of newborns in order to eradicate the disease.

### Vaccination and information

Modern societies are facing the challenge of "rational" exemption, i.e. the family's decision to not vaccinate children as a consequence of a "rational" comparison between the perceived risk from infection and that from getting damages from the vaccine. In order to assess whether this behavior is really rational, i.e. if it can equally lead to the eradication of the disease, one may simply assume that the vaccination rate is an increasing function of the number of infectious subjects:

${\displaystyle P=P(I),\quad P'(I)>0.}$

In such a case the eradication condition becomes:

${\displaystyle P(0)\geq P^{*},}$

i.e. the baseline vaccination rate should be greater than the "mandatory vaccination" threshold, which, in case of exemption, cannot hold. Thus, "rational" exemption might be myopic since it is based only on the current low incidence due to high vaccine coverage, instead taking into account future resurgence of infection due to coverage decline.

### Vaccination of non-newborns

In case there also are vaccinations of non newborns at a rate ρ the equation for the susceptible and vaccinated subject has to be modified as follows:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\mu N(1-P)-\mu S-\rho S-\beta {\frac {I}{N}}S\\[8pt]{\frac {dV}{dt}}&=\mu NP+\rho S-\mu V\end{aligned}}}

${\displaystyle P\geq 1-\left(1+{\frac {\rho }{\mu }}\right){\frac {1}{R_{0}}}}$

### Pulse vaccination strategy

This strategy repeatedly vaccinates a defined age-cohort (such as young children or the elderly) in a susceptible population over time. Using this strategy, the block of susceptible individuals is then immediately removed, making it possible to eliminate an infectious disease, (such as measles), from the entire population. Every T time units a constant fraction p of susceptible subjects is vaccinated in a relatively short (with respect to the dynamics of the disease) time. This leads to the following impulsive differential equations for the susceptible and vaccinated subjects:

{\displaystyle {\begin{aligned}{\frac {dS}{dt}}&=\mu N-\mu S-\beta {\frac {I}{N}}S,\quad S(nT^{+})=(1-p)S(nT^{-}),&&n=0,1,2,\ldots \\[8pt]{\frac {dV}{dt}}&=-\mu V,\quad V(nT^{+})=V(nT^{-})+pS(nT^{-}),&&n=0,1,2,\ldots \end{aligned}}}

It is easy to see that by setting I = 0 one obtains that the dynamics of the susceptible subjects is given by:

${\displaystyle S^{*}(t)=1-{\frac {p}{1-(1-p)E^{-\mu T}}}E^{-\mu MOD(t,T)}}$

and that the eradication condition is:

${\displaystyle R_{0}\int _{0}^{T}S^{*}(t)\,dt<1}$

## The influence of age: age-structured models

Age has a deep influence on the disease spread rate in a population, especially the contact rate. This rate summarizes the effectiveness of contacts between susceptible and infectious subjects. Taking into account the ages of the epidemic classes ${\displaystyle s(t,a),i(t,a),r(t,a)}$ (to limit ourselves to the susceptible-infectious-removed scheme) such that:

${\displaystyle S(t)=\int _{0}^{a_{M}}s(t,a)\,da}$
${\displaystyle I(t)=\int _{0}^{a_{M}}i(t,a)\,da}$
${\displaystyle R(t)=\int _{0}^{a_{M}}r(t,a)\,da}$

(where ${\displaystyle a_{M}\leq +\infty }$ is the maximum admissible age) and their dynamics is not described, as one might think, by "simple" partial differential equations, but by integro-differential equations:

${\displaystyle \partial _{t}s(t,a)+\partial _{a}s(t,a)=-\mu (a)s(a,t)-s(a,t)\int _{0}^{a_{M}}k(a,a_{1};t)i(a_{1},t)\,da_{1}}$
${\displaystyle \partial _{t}i(t,a)+\partial _{a}i(t,a)=s(a,t)\int _{0}^{a_{M}}{k(a,a_{1};t)i(a_{1},t)da_{1}}-\mu (a)i(a,t)-\gamma (a)i(a,t)}$
${\displaystyle \partial _{t}r(t,a)+\partial _{a}r(t,a)=-\mu (a)r(a,t)+\gamma (a)i(a,t)}$

where:

${\displaystyle F(a,t,i(\cdot ,\cdot ))=\int _{0}^{a_{M}}k(a,a_{1};t)i(a_{1},t)\,da_{1}}$

is the force of infection, which, of course, will depend, though the contact kernel ${\displaystyle k(a,a_{1};t)}$ on the interactions between the ages.

Complexity is added by the initial conditions for newborns (i.e. for a=0), that are straightforward for infectious and removed:

${\displaystyle i(t,0)=r(t,0)=0}$

but that are nonlocal for the density of susceptible newborns:

${\displaystyle s(t,0)=\int _{0}^{a_{M}}\left(\varphi _{s}(a)s(a,t)+\varphi _{i}(a)i(a,t)+\varphi _{r}(a)r(a,t)\right)\,da}$

where ${\displaystyle \varphi _{j}(a),j=s,i,r}$ are the fertilities of the adults.

Moreover, defining now the density of the total population ${\displaystyle n(t,a)=s(t,a)+i(t,a)+r(t,a)}$ one obtains:

${\displaystyle \partial _{t}n(t,a)+\partial _{a}n(t,a)=-\mu (a)n(a,t)}$

In the simplest case of equal fertilities in the three epidemic classes, we have that in order to have demographic equilibrium the following necessary and sufficient condition linking the fertility ${\displaystyle \varphi (.)}$ with the mortality ${\displaystyle \mu (a)}$ must hold:

${\displaystyle 1=\int _{0}^{a_{M}}\varphi (a)\exp \left(-\int _{0}^{a}{\mu (q)dq}\right)\,da}$

and the demographic equilibrium is

${\displaystyle n^{*}(a)=C\exp \left(-\int _{0}^{a}\mu (q)\,dq\right),}$

automatically ensuring the existence of the disease-free solution:

${\displaystyle DFS(a)=(n^{*}(a),0,0).}$

A basic reproduction number can be calculated as the spectral radius of an appropriate functional operator.

## Other considerations within compartmental epidemic models

### Vertical transmission

In the case of some diseases such as AIDS and Hepatitis B, it is possible for the offspring of infected parents to be born infected. This transmission of the disease down from the mother is called Vertical Transmission. The influx of additional members into the infected category can be considered within the model by including a fraction of the newborn members in the infected compartment.[13]

### Vector transmission

Diseases transmitted from human to human indirectly, i.e. malaria spread by way of mosquitoes, are transmitted through a vector. In these cases, the infection transfers from human to insect and an epidemic model must include both species, generally requiring many more compartments than a model for direct transmission.[13][14]

### Others

Other occurrences which may need to be considered when modeling an epidemic include things such as the following:[13]

• Non-homogeneous mixing
• Variable infectivity
• Distributions that are spatially non-uniform
• Diseases caused by macroparasites

## Deterministic versus stochastic epidemic models

It is important to stress that the deterministic models presented here are valid only in case of sufficiently large populations, and as such should be used cautiously.[15]

To be more precise, these models are only valid in the thermodynamic limit, where the population is effectively infinite. In stochastic models, the long-time endemic equilibrium derived above, does not hold, as there is a finite probability that the number of infected individuals drops below one in a system. In a true system then, the pathogen may not propagate, as no host will be infected. But, in deterministic mean-field models, the number of infected can take on real, namely, non-integer values of infected hosts, and the number of hosts in the model can be less than one, but more than zero, thereby allowing the pathogen in the model to propagate.

## References

1. ^ a b Kermack, W. O.; McKendrick, A. G. (1927). "A Contribution to the Mathematical Theory of Epidemics". Proceedings of the Royal Society A. 115 (772): 700–721. Bibcode:1927RSPSA.115..700K. doi:10.1098/rspa.1927.0118.
2. ^ Hethcote H (2000). "The Mathematics of Infectious Diseases". SIAM Review. 42 (4): 599–653. Bibcode:2000SIAMR..42..599H. doi:10.1137/s0036144500371907.
3. ^ a b Harko, Tiberiu; Lobo, Francisco S. N.; Mak, M. K. (2014). "Exact analytical solutions of the Susceptible-Infected-Recovered (SIR) epidemic model and of the SIR model with equal death and birth rates". Applied Mathematics and Computation. 236: 184–194. arXiv:1403.2160. Bibcode:2014arXiv1403.2160H. doi:10.1016/j.amc.2014.03.030.
4. ^ Bailey, Norman T. J. (1975). The mathematical theory of infectious diseases and its applications (2nd ed.). London: Griffin. ISBN 0-85264-231-8.
5. ^ Sonia Altizer; Nunn, Charles (2006). Infectious diseases in primates: behavior, ecology and evolution. Oxford Series in Ecology and Evolution. Oxford [Oxfordshire]: Oxford University Press. ISBN 0-19-856585-2.
6. ^ Wolfram Research, Inc. "Mathematica, Version 12.1". Champaign IL, 2020.
7. ^ Miller, J.C. (2012). "A note on the derivation of epidemic final sizes". Bulletin of Mathematical Biology. 74 (9). section 4.1. doi:10.1007/s11538-012-9749-6. PMC 3506030. PMID 22829179.
8. ^ Miller, J.C. (2017). "Mathematical models of SIR disease spread with combined non-sexual and sexual transmission routes". Infectious Disease Modelling. 2 (1). section 2.1.3. doi:10.1016/j.idm.2016.12.003. PMC 5963332. PMID 29928728.
9. ^ Hethcote, Herbert W. (1989). "Three Basic Epidemiological Models". In Levin, Simon A.; Hallam, Thomas G.; Gross, Louis J. (eds.). Applied Mathematical Ecology. Biomathematics. 18. Berlin: Springer. pp. 119–144. doi:10.1007/978-3-642-61317-3_5. ISBN 3-540-19465-7.
10. ^ (p. 19) The SI Model
11. ^ Amenaghawon Osemwinyen, Aboubakary Diakhaby (2015). "Mathematical Modelling of the Transmission Dynamics of Ebola Virus". Applied and Computational Mathematics. 4: 313–320.
12. ^ The first and second differential equations are transformed and brought to the same form as for the SIR model above.
13. ^ a b c Brauer, F.; Castillo-Chávez, C. (2001). Mathematical Models in Population Biology and Epidemiology. NY: Springer. ISBN 0-387-98902-1.
14. ^ For more information on this type of model see Anderson, R. M., ed. (1982). Population Dynamics of Infectious Diseases: Theory and Applications. London-New York: Chapman and Hall. ISBN 0-412-21610-8.
15. ^ Bartlett MS (1957). "Measles periodicity and community size". Journal of the Royal Statistical Society, Series A. 120 (1): 48–70. doi:10.2307/2342553. JSTOR 2342553.