Introduction

Epidemics are population level phenomena that can display a range of dynamics that “emerge” as a result of interactions between members of the affected population.

The classic mathematical models which are used to describe the underlying dynamics of epidemics are based on the work of Kermack and McKendrick, first published in 1927. Although there are now many published extensions and modifications to the early formulation of the problem, the basic SIR model remains widely used. They form a logical and useful means of describing the underlying processes involved and provides the vocabulary used to describe epidemics to this day.

All models are wrong, but some are useful. The deterministic SIR model is a very useful model framework, but it does have to be used very carefully and considered critically.

The basis of the SIR model is a set of deterministic, differential equations. Differential equations represent rates of change.

Some points to note from the outset.

Deterministic models do not allow for any chance events. This is both a strength and a weakness of the models. The models are completely determined by their parameters, from the outset. They can therefore be analysed formally. They are tractable in the mathematical sense. Their equations can be solved and manipulated to derive analytical results. This does not imply that the actual model results are correct in any real life context. It only means that all the mathematical results that derived from the models can be checked and verified for mathematical validity. Solving complex mathematical problems is satisfying and produces correct answers in context. However any analysis of a model can still lead to correctly calculated results that are still precisely wrong! All models depends on assumptions. Modelers spend most of their time analysing the sensitivity of models to the assumptions.

Real life epidemics do not (and cannot) follow all the assumptions used in the simpler models. More complex models can be more realistic, but are harder to construct, harder to analyse and crucially it can be much harder to check all assumptions.

The key assumption of the SIR model is the assumption of “panmixia”. If panmixia is assumed then all individuals in a population at risk from an epidemic have an equal probability of contact with other individuals.

A model assuming panmixia can modify the consequences of contact through changes to the transmission rate. However such a model does not take into account heterogeneity in contact probabilities.

Another issue is that the mathematics of a differential equation involving instantaneous rates of change actually predicts fractions of people. In a real epidemic it is impossible to measure a number such as 5.1436 people infected! There must be either 5 or 6 people with the disease.

Many (not all) epidemics do follow the general pattern of the classic model. Discrete populations can be approximated by differential equations. Stochastic (chance) events do tend to “even out” in the end. Classical models remain useful approximations.

However, real life populations do only approximate panmixia. Measures that reduce panmixia, such as travel bans and social distancing tend to lead to epidemic dynamics that will differ very markedly from those predicted by the classic models. The purpose of this practical is to investigate both the strengths and the weaknesses of the conventional SIR model.

This handout complements the explanation I’ve provided as a storyline for the insight maker version of the model.

https://insightmaker.com/insight/189276/SIR

You should use both in order to build a comprehensive understanding of this very important model which forms the foundation of epidemiology.

The SI model

Let’s first imagine a population of N people that may be affected by some disease. We’ll call the fictional disease Zombyism.

In the “apocalyptic” version of zombyism there is no cure and there is no recovery. Once infected with zombism the individuals remain as zombies for ever.

This leads to the SI formulation of the problem.

We call it the SI model as it involves susceptible (S) and infected (I) individuals.

The proportion of Infected individuals is \(\frac{I}{N}\)

The proportion of susceptible individuals is \(\frac{S}{N}\)

Let’s assume the population consists of 100 individuals. So

\(N = 100\)

Assume one person starts the epidemic by becoming a zombie. So the initial value is

\(I = 1\)

Now let’s introduce a parameter for the model We call this \(\beta\) (beta) At this initial stage of the apocalypse \(\beta\) represents the number of new zombies that are infected each day by this initial zombie. If \(\beta = 0.1\) this implies that one tenth of a person becomes infected each day. This cannot actually happen, but we can easily see that this does mean that there will be one new zombie every ten days.

We can write the equations like this ..

\(\frac {dS}{dt} = - \beta \frac{SI}{N}\)

\(\frac {dI}{dt} = \beta \frac{SI}{N}\)

So, if we run the model with \(\beta = 0.1\) for 100 days beginning with one zombie and 99 people the results are as shown below.

After 100 days the whole population has become zombies. Apocalypse!

Note how the model assumes complete mixing of the population and smooth curves with no break points to represent discrete individuals.

It also assumes that the intrinsic probability of any single zombie finding and infecting a new person is not dependent on the absolute size of the population (N). However the proportion of the population that is infected by a single Zombie at the outset of the epidemic does depend on the population size. So outbreaks in large populations take longer to be noticed. As the initial dynamic is very closely approximated as exponential growth the actual shape of the curve of an SI model is not dependent on the population size. The time to completely infect the whole population is not a linear function of population sizes.

Sensitivity to the parameters of the SI model

In the simple SI model no one ever recovers. So no matter how low the possibility of transmission is set, eventually everyone in the population will eventually become infected (unless they die of some other cause first).

Your task is to experiment with the model by clicking on the link here.

http://r.bournemouth.ac.uk:3838/Epidemics/SI/

Questions

Set a range of beta levels combined with population sizes. Write down the time at which the whole population is infected. Try plotting your results. What are your conclusions?

An individual based SI model

An alternative to the completely deterministic, compartment based, modelling is to consider an individual (or agent based) based model. Such models are often referred to as IBMS or ABMs.

Netlogo is a programming language designed to make the construction of simple individual based models comparatively easy. Complex IBMs can be linked to GIS in order to simulate realistic scenarios in the real world. However for this class we will just look at a conceptual (heuristic) model of the spread of zombyism.

Heuristic models strip out much of the complexity of a system in order to investigate the basic underlying behaviour of a system. They may appear to be rather like computer games, but the purpose is to investigate the consequences of model assumptions in an artificially simplified environment.

The model we will use is a modified version of the virus model included with Netlogo. It can be run directly in a web browser by clicking on the link below.

http://r.bournemouth.ac.uk:82/epidemiology/Zombie_apocalypse2.html

In the model people wander around at random within the bounds of the artificial world. Contacts between a zombie (red) and a healthy person (green) can result in transmission of zombyism with a set probability. You can alter the number of people in the world.

Note that this simple model introduces a new factor involved in the spread of the disease. The parameter \(\beta\) in the SI model actually consists of two components. The first component is the number of contacts resulting in potential exposure to infection of healthy individuals that each zombie is likely to have in a given time frame. The second component is the probability that a contact actually results in transmission. There is also a stochastic component introduced by the formulation of the problem as an individual based model. In the deterministic model there is no possibility of avoiding infection through chance. In a stochastic model random events can result in some individuals never coming into contact with any infected individuals.

In this case the size of the population within the modelled area (density) will alter the dynamics of the spread. This effect could be captured within the SI model, but only through altering \(\beta\), which in effect represents both the probability of contact and the probability of transmission in one number. So the simple IBM can show some additional features of epidemic dynamics.

To use an SI model we need to prevent zombies from recovering (we will come on to the case of recovery with immunity later).

So run the model first with 300 people, a chance of recovery of zero (zombies remain as zombies) and a duration of 200 weeks (zombies finally become really dead after being walking dead after 200 weeks.)

The run produces the zombie apocalypse. The entire population become zombies.

Experiment with the model by changing the population density.

Questions

The SIR model

So far we have only considered transmission between susceptible and infected individuals. If you ran the IBM for a long time period you may have seen the zombies eventually dying off. When an individual dies it is removed from the general population. Another mechanism through which individuals may be removed from the population at risk is through acquiring immunity.

The classic SIR model uses three compartment.

In order to model this situation we need to introduce a second parameter, which is typically known as \(\gamma\) (gamma). Gamma represents the proportion of the infected population that is removed (die or become immune) in any one time step. The model now becomes.

\(\frac {dS}{dt} = - \beta \frac{SI}{N}\)

\(\frac {dI}{dt} = \beta \frac{SI}{N}- \gamma \frac{I}{N}\)

\(\frac {dR}{dt} = \gamma \frac{I}{N}\)

Because gamma is the proportion of people recovering, or dying, from the illness each time step then \(\frac{1}{\gamma}\) = the average duration of the illness. If \(\gamma\) = 0.1 then the illness lasts 10 days, on average.

Setting \(\beta = 0.3\) and \(\gamma = 0.1\) produces this output.

You can experiment with combinations of the parameters using this link.

http://r.bournemouth.ac.uk:3838/Epidemics/SIR/

Try changing the sliders to see how the model dynamics are affected.

Questions

Individual based SIR modelling

Now we will model an outbreak of lazarus zombyism. In this case the walking dead can recover and become human once more.

http://r.bournemouth.ac.uk:82/epidemiology/Zombie_apocalypse2.html

First set the probability of recovery to 100% and the duration of zombyism to around 30 weeks.

This initially produces a result that more or less matches the SIR model pattern.

However there are other effects that can be captured by the simulation.

In the simulation those who have recovered from zombyism lose their acquired immunity after 52 weeks. This can lead to a resurgence in the incidence of the illness.

Experiment with the simulation to discover alternative patterns of behaviour. Use the model to help understand the logic behind the more abstract mathematical models that are used by epidemiologists to predict the dynamics of real life epidemics.

Take some notes explaining why these behaviours occur.

Questions

Contact networks

The key assumption of panmixia is approximated under the “small world” model of social contacts. However panmixia can be broken through social distancing models. This leads to a flatter curve as the spread of infections takes place though a local network. The analytical conclusions of the SIR model lose their value in such a setting.

The social distancing model allows exploration of a wide range of concepts concerning spread over a network. The general conclusion is that if the panmixia assumption is not valid the epidemic curve flattens, but the duration of the epidemic is extended as it spreads through a localised “chain” reaction.

In the model below individuals are connected to other individuals through links. The epidemic can be transmitted along the links. If “long distance” links are switched on the system simulates panmixia, as there are only a small number of links between any individual and any other. If long distance links are switched off and/or social distancing measures implemented after a time which reduce the number of links then the panmixia assumption is not met.

http://r.bournemouth.ac.uk:82/epidemiology/social-distancing2.html

Conclusions

Useful analytical results from the SIR model

When analysing the SIR model some outcomes can be predicted from the underlying mathematics. These form the basis of discussions based on the model.

The basic reproduction number \(R_0\)

The basic reproduction number, written as \(R_0\), represents the number of new cases that an initial case generates, on average over the course of its own infectious period, assuming all the rest of the population is uninfected.

You can estimate \(R_0\) in a simple SIR model by thinking about the meaning of the parameters \(\beta\) and \(\gamma\). Each day the first infected individual will produce \(\beta\) new cases. An individual remains infectious for \(\frac{1}\gamma\) days. So

\(R_0 \approx \frac{\beta}\gamma\)

This is extremely important.

If \(R_0 < 1\) the epidemic clearly will not spread, as fewer than one new case arises as a result of the initial infection.

It is well worth returning to the SIR simulation model in order to investigate the behaviour of the outbreak when \(R_0\) is set to different values as a result of choosing different combinations of beta and gamma. This will be useful when thinking about the results of interventions.

Some results are predictable without the need to actually “run” a model. You can use your insights from this exercise when designing interventions for the Ebola assignment.

The epidemic final size

For a simple, closed SIR outbreak, we can derive an expression that determines the final size of the outbreak, i.e., the fraction of the population ultimately infected.

\[R_0=-\frac{\log{(1-f)}}{f}.\]

The following shows the relationship between final size and \(R_0\)

“Herd immunity”

A simple relationship can be derived from the SIR model that relates R_0 with the proportion of immune (or recovered) needed for the epidemic to spread.

The critical portion of the population that needs to be immune in order to prevent the spread of an epidemic is

\[P_i= 1- \frac 1 {R_0}\]