You are on page 1of 86

MD01 Basic modelling methods I: an

introduction to difference equations


EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 1: Overview and objectives


page 1 of 80

next

OVERVIEW
This session introduces the process used in developing models, from identifying the
question to selecting the model structure, choosing the modelling method, quantifying the
parameters and ultimately using the model for predictions and decision-making. The use of
difference equations (and the parameters used in difference equations) in deterministic
models is also explained in this session.
OBJECTIVES
By the end of this session you should:
Understand the steps involved in developing mathematical models;
Be aware of some common model structures and the methods used for modelling
the transmission of infections;
Understand how deterministic models are set up using difference equations;
Be able to write down simple models describing the transmission dynamics of
infections using difference equations;
Be able to define key input parameters.
This session comprises two parts and will take 2-5 hours to complete.
Part 1 (1-2 hours) covers the key steps and the methods for setting up simple models. Part
2 (1-3 hours) consists of an exercise in Excel in which you will set up a model describing
the transmission of measles.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 2: Introduction: Why might we use models?


page 2 of 80

prev

next

There are many reasons why we might want to set up a model describing the transmission
or spread of an infection through a population. For example, we might want to predict the
possible impact of a control strategy, predict future numbers of cases or improve our
understanding of why we see particular patterns and trends in incidence.
If you followed the study module EP301, Session EC06 , you will have come across
examples illustrating how mathematical models have been used to predict the impact of
rubella vaccination on the burden of Congenital Rubella Syndrome, and the burden of
Creutzfeldt-Jakob disease (CJD) in the UK.
In fact, there are many different infections and questions for which models have been built,
including measles, HIV, rubella, tuberculosis, malaria, and influenza.
To illustrate the use of modelling, we discuss the specific example of pandemic influenza,
for which a considerable amount of modelling was carried out after the year 2000.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 3: An illustration of the use of modelling: pandemic


influenza
page 3 of 80

prev

next

The emergence of the highly pathogenic H5N1 avian influenza ("bird flu") virus in poultry
during the early 21st century led to increasing fears that the virus might become
transmissible to humans. This could then lead to an influenza pandemic given that no
individuals had any immunity to this virus. Similarly, at the start of the H1N1 ("swine flu")
pandemic in 2009, there was much concern about the potential scale of the pandemic and
its severity.
There had been 3 influenza pandemics in humans during the 20th century, namely during
the periods 1918-9, 1957-8 and 1968-9, and there were fears that the next pandemic
could be as devastating as that in 1918, to which 50-100 million deaths have been
attributed 1 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.1: An illustration of the use of modelling: pandemic


influenza
page 4 of 80 3.1

prev

next

The 1918 influenza pandemic also caused major disruption in daily life, with mass
gatherings being banned in some settings, and theatres, music halls and churches being
shut.
Click here
pandemic.

to see a review of the public health interventions during the 1918 influenza

Similar public health measures were introduced in the countries affected by the SARS
epidemic in 2003 2 , providing a further reminder of the potential impact of an influenza
pandemic.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.2: An illustration of the use of modelling: pandemic


influenza
page 5 of 80 3.1

3.2

prev

next

To prevent similar levels of morbidity and disruption, if the H5N1 virus were to become
transmissible between humans, the World Health Organization called for countries to
review their pandemic preparedness plans in 2005 3 . The interventions available at that
time, namely vaccination and antivirals, had their limitations.
For example, many months may elapse between the emergence of a strain that is
transmissible to humans and the development of a suitable vaccine, by which time the
pandemic could have already affected many individuals 4,5 .
A further complication with vaccination is that influenza pandemics can occur in several
waves 6 and that the vaccine which might be available for use before the first wave is
likely to be of a poorer quality than that available before the second wave 7 . In addition,
relatively few countries had purchased any stockpiles of antivirals and the size of the
stockpile varied greatly. For example, in November 2005, European countries typically had
sufficient quantities for between 2% and 53% of their populations8 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.3: An illustration of the use of modelling: pandemic


influenza
page 6 of 80 3.1

3.2

3.3

prev

next

Among the key questions that policy makers wanted to answer in 2006 and then again in
the year 2009, when the swine flu virus emerged, were:
1. What would the impact of imposing travel restrictions be?
2. If a vaccine becomes available, how should it be distributed? For example, should it
be given to children first of all, as children appeared to have been the key
transmitters during some of the previous pandemics?
3. Should people be vaccinated with the lower quality vaccine before the first wave or
wait until a high quality vaccine becomes available before the second wave?
4. What would the impact of shutting down schools during a pandemic be?
5. How many cases might be seen if the available doses of antivirals run out during the
first few weeks of a pandemic?
6. Would it be better to distribute the available antivirals as prophylaxis to contacts of
cases or to use them to treat the cases themselves?
Questions such as these are difficult to answer confidently using intuition or analyses of
data from previous pandemics alone. We shall discuss this further on the next page.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.4: An illustration of the use of modelling: pandemic


influenza
page 7 of 80 3.1

3.2

3.3

3.4

prev

next

To illustrate the difficulty with answering the questions described on the last page, consider
the following:
The impact of vaccinating specific age groups depends on contact patterns in the
population: vaccinating children in populations in which children contact many adults
may have a bigger impact than in settings where children contact few adults.
The relative impact of vaccinating individuals before the first or second wave of a
pandemic depends on the vaccine efficacy and on the proportion of individuals who
are susceptible to infection after the first pandemic wave. Policy decisions about
vaccination therefore need to account for different contact patterns in the population,
different levels of susceptibility to the infection and the vaccine efficacy itself.
The impact of school closures during a pandemic depends on the amount by which
contact between children and others changes because of school closures (which is
largely unknown).
Mathematical modelling was used to address many of these questions and to inform
decision making. Some examples of this work are shown in Figure 2 9-14 .

Figure 2. Some of the modelling publications on pandemic influenza

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.5: An illustration of the use of modelling: pandemic


influenza
page 8 of 80 3.1

3.2

3.3

3.4

3.5

prev

next

Amongst other aspects, this work has highlighted the importance of providing antivirals to
contacts of cases as soon as possible after the onset of symptoms 15,16 . It also
demonstrated that, as shown in Figure 3, the increasing connectedness of cities worldwide
means that travel restrictions are unlikely to substantially delay the spread of an influenza
pandemic 17,18 .

Figure 3. Model predictions of the impact of imposing travel restrictions after 1 case per 100,000 has been seen
in a given city, for different assumptions about the scale of the effectiveness of the reduction in travel and using
airline travel data from 2005. Note that even highly effective (99% or 99.9%) reductions in travel can, at best,
delay the spread of a pandemic by 1-2 months. Reproduced from17 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

3.6: An illustration of the use of modelling: pandemic


influenza
page 9 of 80 3.1

3.2

3.3

3.4

3.5

3.6

prev

next

The insights provided by models, such as those described above, can be useful. However,
it is important to remember that, as you will see in this study module, models are often set
up by making many simplifying assumptions.
Before using the model output to influence policy decisions or to make recommendations,
the input parameters and the simplifying assumptions need to be understood.
On the next few pages, we will disuss how models are set up and how the input
parameters which go into models are identified.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 4: The steps in setting up models


page 10 of 80

prev

next

The whole process of setting up a model can involve many steps, as illustrated in Figure 4.
The list shown here is comprehensive as it was written following the experience of a group
in Rotterdam whilst it was developing large models of the transmission of several
infections, including onchocerciasis. These models were intended to be a practical tool for
use by policy makers and programme managers.
The entire process of developing a model is highly iterative and continuously refined, and
for large models, the process may take many years.

Figure 4. Steps in the development and use of a model (adapted from Habbema, et al. (1996)19

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 5: Step 1. Identify the question


page 11 of 80

prev

next

We will show how these steps can be applied by considering the following simple research
question:
EXAMPLE
If one infectious person with measles is introduced into a completely susceptible
population of 100,000 individuals, how will the average number of individuals who are
either susceptible, infectious or immune change over the subsequent 100 days? To keep it
simple for now, we will ignore births and deaths in the population.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 6: Step 2. Identify existing (relevant) facts


page 12 of 80

prev

next

The next step after identifying our research question is to identify existing knowledge of the
population and the infection which is relevant to the research question. A review should
focus on collecting data on the demographic, epidemiological and biological characteristics
of the infection and the population.
This review will involve reading through research papers, grey literature, lab reports,
previous modelling studies and discussion with experts. If we are also interested in
possible control options then the relevant data should be collected.
Before continuing, write down 5 key questions that we might need to answer in order to
address our measles problem .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

6.1: Step 2. Identify existing (relevant) facts


page 13 of 80 6.1

prev

next

The following are some examples of questions that we might want to answer in order to
address our measles problem.
Does the infection confer immunity?
What is the pre-infectious (latent) period (time period between infection and onset of
infectiousness)?
How long are people infectious for?
How many people does each person contact each day?
Does the infection affect all age groups equally?
If you know the answers to these questions, please write them down.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

6.2: Step 2. Identify existing (relevant) facts


page 14 of 80 6.1

6.2

prev

next

The following are the answers to our questions.


Does the infection confer immunity?
Measles does appear to confer permanent immunity.
What is the pre-infectious (latent) period (time period between infection and onset of
infectiousness)?
The average pre-infectious period for measles is 8 days.
How long are people infectious for?
The average infectious period for measles is 7 days.
How many people does each person contact each day?
Each person probably meets approximately 15 otherpeople per day on
average. However, we also need to think about how many of those contacts
lead to transmission. The number will also differ greatly between settings and
will vary between different age groups.
Does the infection affect all age groups equally?
This is not straightforward.It depends largely on contact patterns between
different age groups.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 7: Exercise
page 15 of 80

prev

next

Based on these facts try to draw a graph (using the figure below as a template) of how the
number of susceptible, infectious and immune individuals might change over time if we
introduce a single infectious person with measles into a totally susceptible population with
100,000 individuals.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

7.1: Exercise
page 16 of 80 7.1

prev

The following are examples of figures that students in the past have drawn when
answering this question.

next

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

7.2: Exercise
page 17 of 80 7.1

7.2

prev

next

You probably found that it was difficult to draw a graph, based on the information that we
provided so far.
However, we can make reasonable predictions of the likely numbers of susceptible,
infectious and immune individuals by writing down the equations for the number of
individuals in these categories that we see tomorrow in terms of the number in these
categories today.
In order to do this, we need to move onto step 3 in the model development process
i.e. decide on the model structure.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 8: Step 3. Choose model structure


page 18 of 80

prev

next

When choosing the structure of your model, the infection stages and transitions need to be
described, as well as important categories in the population itself. In this module, we define
a model structure as a system for categorising types of people within a population,
according to whether they are susceptible, infectious, immune etc, and the processes by
which individuals can move from one category to another (transitions).
The complexity of the model should also be considered: the quote attributed to Einstein
that "models should be as simple as possible and no simpler" should be borne in mind
when deciding what disease and population categories are really necessary to address the
research question.
To describe a model structure we will draw boxes to denote relevant categories (or strata)
of individuals, and arrows between boxes to denote the potential transitions.
The following is an example of the simplest model structure, in which individuals are
stratified into those who are susceptible and those who are infectious. This is known as an
SI (Susceptible-Infectious) model structure. In this model structure, once infectious,
individuals are infectious for life.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.1: Step 3. Choose model structure


page 19 of 80 8.1

prev

next

Figure 5 shows some of the most common model structures used in modelling the
transmission of infections.
The Susceptible - Infectious - Susceptible (SIS) model assumes that once infectious,
individuals can recover to become fully susceptible again.
The Susceptible - Infectious - Recovered/Immune (SIR) and Susceptible - Pre-infectious Infectious - Recovered/Immune (SEIR) models assume that once recovered, individuals
are immune for life. We will discuss the distinction between these two structures in the next
page.
The Susceptible - Infectious - Recovered - Susceptible (SIRS) and the Susceptible - Preinfectious - Infectious - Recovered - Susceptible (SEIRS) models assume that once
individuals have recovered and become immune, they can become fully susceptible again.

Figure 5. Common categories of infection used for modelling the transmission of infections

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.2: Step 3. Choose model structure


page 20 of 80 8.1

8.2

prev

next

The SEIR and SEIRS model structures are similar to the SIR and SIRS model structures
except they include a category of individuals who are "pre-infectious", i.e. infected but not
yet infectious.
Note that in the literature, the pre-infectious individuals in SEIR and SEIRS models are
frequently referred to as "Infected" or "Exposed" individuals. This terminology can be
misleading, since all individuals can be considered to be exposed; likewise, infectious
individuals can be considered to be infected.
To reduce confusion, we shall refer to these individuals as being "pre-infectious" during the
course and we shall use the letter E to identify this group in model diagrams.
In the modelling literature, the term recovered is typically used to refer to those who have
been removed from the transmission dynamics because of the immunity that they have
acquired following infection. The term is usually not used in the way it would be used in
everyday conversation to refer to those who no longer have symptoms.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.3: Step 3. Choose model structure


page 21 of 80 8.1

8.2

8.3

Q1.1 Match the following infections with the appropriate model structure.
a) Rubella

Choose...
Choose...

b) Mumps

Choose...
Choose...

c) Chlamydia

Choose...
Choose...

d) Pertussis

Choose...
Choose...

e) Gonorrhoea

Choose...
Choose...

f) HIV

Choose...
Choose...

prev

next

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.4: Step 3. Choose model structure


page 22 of 80 8.1

8.2

8.3

8.4

prev

next

Q1.2 Before continuing, think about which model structure would be most appropriate for
answering our measles question .
Click here
Answer

to remind yourself of the key model structures.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.5: Step 3. Choose model structure


page 23 of 80 8.1

8.2

8.3

8.4

8.5

prev

next

However, before deciding on the model structure we need to consider a few other
questions:
1. How accurate do the predictions need to be, knowing that the pre-infectious period is
8 days for measles?
If the model predictions need to be accurate to the nearest day, it is important to account
for the (relatively) long time lag between infection and the onset of infectiousness.
Therefore, an SEIR model should be used for our measles problem. On the other hand,
since all infected individuals become infectious and eventually immune, we could use
either an SEIR or an SIR model if we just needed to know the total outbreak size.
2. Do we need to make predictions for different age groups or other subgroups?
Our population may need to be split into subgroups, according to the infection. For
example, if we wanted to predict the number of cases by age, then the model population
would need to be stratified by age. If we wanted to predict the number of cases by socioeconomic group, then we'd also need to have appropriate social groups in the model. Note
that if there are important differences between different age groups or social groups, for
example, in the amount of contact that they have with others, then we may also want to
stratify the model by age, even if we do not need to have age-stratified predictions.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.6: Step 3. Choose model structure


page 24 of 80 8.1

8.2

8.3

8.4

8.5

8.6

prev

next

3. Do we need to make short or long term predictions (i.e. spanning days or years)?
If we want to describe the long-term dynamics of an infection then the model may need to
incorporate births, deaths, seasonal mixing patterns (e.g. due to school attendance) or
migration (either into or out of the population).
4. Against what data can the model output be compared?
Whilst setting up the model, it is important to consider what type and format of model
output is needed, so that it can be compared to available data to test and validate the
model later on.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

8.7: Step 3. Choose model structure


page 25 of 80 8.1

8.2

8.3

8.4

8.5

8.6

8.7

prev

next

Returning to our measles problem...


Since the measles problem is considering only the short-term dynamics, we'd like to have
predictions that are as accurate as possible and a model that's as simple as possible. We
will therefore use an SEIR model.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 9: Step 4. Choose modelling method


page 26 of 80

prev

next

Models can be set up using at least two types of equations: deterministic or stochastic
equations. These are based on difference/differential or stochastic equations, respectively.
The distinction between the two is not clear-cut: some largely deterministic models also
incorporate stochastic elements and nearly all stochastic models incorporate some
deterministic elements20 . Panel 2.1 of the recommended course text 22 discusses the
main categories of models.
We provide an overview of the two methods on the following page.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

9.1: Step 4. Choose modelling method: Stochastic modelling


page 27 of 80 9.1

prev

next

Stochastic models incorporate the effect of chance on the transmission process and
provide a range of possible outcomes 21 , for example, the minimum and maximum
number of cases that we are likely to see over the next few weeks. These types of models
are used when chance fluctuations are important, as may be the case for small or isolated
populations.
For example, if we introduce an infectious person into a small population such as a
hospital ward, then sometimes, by chance, no outbreak will occur. Likewise sometimes, by
chance, a large outbreak involving most individuals can also occur. A stochastic model will
be able to tell us the likely range of the final outbreak size.
Stochastic models are suitable for situations in which the variance of the outcome is as
important as the average behaviour. These models often (but not exclusively) try to
describe the infection process for every individual or even every (macro-) parasite in a
population. Figure 6 illustrates the output from a stochastic model.
The methods for stochastic modelling are not covered in this course. However you may
read about this approach in Chapter 6 of the recommended course text 22 .
Prevalence (%) by year, 40 runs

Figure 6. Example of the output from a model using stochastic equations. Each line is a prediction from a single
run of the model.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

9.2: Step 4. Choose modelling method: Deterministic


modelling
page 28 of 80 9.1

9.2

prev

next

Deterministic, or "compartmental" models aim to describe what happens "on


average" in a population. These models tend to categorise individuals in the population
into broad subgroups (compartments) and describe the transitions between categories by
applying average transition rates.
Many of the models in the literature are deterministic, largely because they are easier to
set up than are stochastic models, and because the technology for stochastic modelling
has only recently become readily available. Generally, it is more complicated to describe
what is happening for each individual than it is to describe average behaviour at the
population level. Figure 7 shows sample output from a model using deterministic
equations.

Figure 7. Example of the output from a model using deterministic equations

Q1.3 Why might it be appropriate to use a deterministic model to answer our measles
question ?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

9.3: Step 4. Choose modelling method: Deterministic


modelling
page 29 of 80 9.1

9.2

9.3

prev

next

Deterministic models can be set up using either so-called "difference" or "differential"


equations. The main difference between the two relates to the time step used in making
predictions.
Difference equations use discrete time steps (such as a day, or a month), and differential
equations use time steps which are "infinitesimally" or "vanishingly" small, i.e. they try to
describe events occurring in continuous time.
In this session we will use difference equations and in the next session we will use
differential equations.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 10: Deterministic modelling using difference


equations
page 30 of 80

prev

next

Difference equations aim to describe the transitions of individuals between different


disease categories using discrete time steps (e.g. daily) by expressing the number of
individuals at a given time t+1 (e.g. tomorrow) in terms of that at an earlier time t (e.g.
today). Note that we can choose the time unit as we see fit - one step might be an hour, or
a day, or a week, for example.
EXAMPLE
For our measles example, we have decided to use the SEIR model structure.
Before we write down the equations, we first introduce some definitions. The words in the
compartments are matched with symbols in order to make categories easier to reference.
We also include symbols in the following model diagram to represent the rate at which
individuals move from one compartment to the next.

The definitions are as follows:


S t is the number of individuals who are susceptible at time t;
E t is the number of individuals who are pre-infectious at time t;
I t is the number of individuals who are infectious at time t;
Rt is the number of individuals who are recovered (i.e. are immune) at time t.
t is the incidence risk or the risk of a susceptible individual becoming infected
between t and t+1. For historical reasons it is also called the force of infection by
modellers (this is discussed in later sessions). is the Greek lower case letter,
pronounced lambda.
f is the proportion (or risk) of pre-infectious individuals becoming infectious between
time t and t+1.
r is the proportion (or risk) of infectious individuals recovering (becoming immune)
between time t and t+1.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

10.1: Difference equations: the number susceptible


page 31 of 80 10.1

prev

next

We first write down the equations for the number who are susceptible at time t+1 (S t+1 ).
This is given by the following equation:
S t+1

the number who were


susceptible at time t (St )

the number newly infected


between time t and t+1

The number of newly infected individuals between time t and t+1 is the product of the risk
of infection per unit time (the force of infection, t ) and the number who are susceptible at
time t (S t ), as follows:
the number newly
infected between time t
and t+1

= t S t

For example, if we have 500 susceptible individuals today (S t ) and the risk of infection is
10% per day ( t), the number newly infected by tomorrow should be 500 0.1 = 50
individuals. For simplicity we will usually omit the multiplication sign between t and S t
when using this and other similar expressions.
Substituting the expression for the number newly infected between time t and t+1 into the
above expression for S t+1 leads to the following equation for S t+1 :
S t+1 = S t - tS t

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

10.2: Difference equations: the number pre-infectious


page 32 of 80 10.1

10.2

prev

next

In a similar way, the number who are infected but not yet infectious (pre-infectious) at time
t+1 (E t+1 ) is given by the following equation:

E t+1

the number who


were pre=
infectious at time
t (E t)

the number newly


infected between
+
time t and t+1
( tS t)

the number who


became infectious
between time t and
t+1

The second term in this equation is identical to the number leaving the susceptible
category ( tS t) between time t and t+1, but note that as the newly infected individuals are
entering the category, the term is preceded by a "+" sign instead of a "-" sign.
The number who become infectious between time t and t+1 is the product of the risk of
becoming infectious between time t and t+1 (f) and the number who are at risk of
becoming infectious at time t (E t).
So, the number who is pre-infectious at time t+1 is given by:
E t+1 = E t + tS t - fE t

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

10.3: Exercise: the number infectious and immune


page 33 of 80 10.1

10.2

10.3

prev

next

Q1.4 Drag the terms from the term bank below to the empty boxes to complete the
expressions for the number of infectious and immune individuals at time t+1. Note that
each term can be used only once in each expression. You can check your answer by
clicking on the answer box.

Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

10.4: Difference equations: Summary


page 34 of 80 10.1

10.2

10.3

10.4

prev

next

We now summarise our equations for the numbers of susceptible, pre-infectious, infectious
and immune individuals at time t+1 as follows:
S t+1 = S t - tS t
E t+1 = E t+ tS t - fE t
I t+1 = I t+ fE t - rI t
Rt+1 = Rt+ rI t
These equations provide a good method of predicting the numbers of individuals who are
susceptible, pre-infectious, infectious and immune over time.
For example, if we know the numbers of susceptible, pre-infectious, infectious and immune
individuals at the start (i.e. day 0), and if we know the values for t, f, and r, then we can
calculate the numbers of individuals in each category on day 1. We can then use the
values obtained for day 1 to obtain the values of the numbers of susceptible, preinfectious, infectious and immune on day 2 and so on. These calculations can be set up
fairly easily using a spreadsheet and will be demonstrated in the second (practical) part of
this session. Before we can do this, however, we need to know the values for t, f, and r.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

10.5: Difference equations: Summary


page 35 of 80 10.1

10.2

10.3

10.4

10.5

prev

next

Before continuing, it is worth reflecting on the size of the time step used in difference
equations, as this affects the reliability of the model.
For example, the number of susceptibles who were newly infected (became pre-infectious)
between time t and t+1 (given by tS t ) is expressed in terms of the number susceptible or
infectious at time t. If the time step used is large (3 days, for example), then, as we shall
see later in this module, this expression may under- or overestimate the true number who
are newly infected.
The reliability of the model can be improved by reducing the size of the time step, so that
values in the model can be changed more often, e.g. twice a day at a time t+ , t+1,
t+1, etc. The differential equations approach takes the reduction in the size of the time
step to the limit, describing the transmission dynamics in continuous time. This approach
is covered in the next session.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 11: Step 5. Model quantification: specifying the input


parameters
page 36 of 80

prev

next

We have now reached Step 5 in the process of model development that we discussed on
page 10 , namely that of model quantification.
As the model is developed, the rates at which individuals move between categories and
the distribution of individuals need to be quantified. The main problem at this stage is the
lack of reliable data.
We can identify appropriate values for parameters by using primary data collection, from
epidemiological studies, data analysis of statistical models or other modelling exercises
and expert opinion. Parameter estimation is discussed further in later sessions.
In order to solve the difference equations for our model (i.e. use the difference equations
to predict what might happen over time), we need to estimate the transition parameters.
For our measles problem we need to estimate:
t , the risk that a susceptible individual is newly infected between time t and t+1
(also known as the incidence risk or the force of infection);
f, the proportion of pre-infectious individuals who become infectious between time t
and t+1; and
r, the proportion of infectious individuals who recover (i.e. become immune) between
time t and t+1.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.1: Step 5. Model quantification: calculating the risk (force)


of infection
page 37 of 80 11.1

prev

next

The risk that a susceptible person is newly infected during a given time step depends on
two factors:
1. The number of infectious individuals present in the population at a given time, and
2. The rate at which the susceptible individual comes into "effective contact" with
infectious individuals.
Before we obtain an expression for the risk of infection, we first consider what we mean by
an effective contact.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.2: Step 5. Model quantification: calculating the risk (force)


of infection
page 38 of 80 11.1

11.2

prev

next

An effective contact is defined as one that is sufficient to lead to infection if it occurs


between a susceptible and an infectious individual 23 . It will depend on both the infection
and the setting as shown in the figures below. For example, in the data shown in Figure 8,
a much greater proportion of household contacts of TB cases appeared to be infected with
M.tuberculosis than were contacts in the general population.
This suggests that the type of contact that occurs in the general population is not as
effective in transmitting M.tuberculosis as the contact that occurs in households.
As shown in Figure 9, a greater proportion of residents in each age group in urban
populations in Panama were likely to have rubella antibodies than were residents of rural
areas. This suggests that those living in urban areas have more effective contacts than do
residents in rural areas, probably as a result of differences in crowding or population
density.

Figure 8. Prevalence of tuberculin positivity ("infection")


among contacts aged 0-14 years of TB cases in different
settings in Rotterdam, 1967-924 .

Figure 9. Proportion of women who were positive for rubella


antibodies in urban and rural Panama, 196825 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.3: Step 5. Model quantification: calculating the risk (force)


of infection
page 39 of 80 11.1

11.2

11.3

prev

next

The simplest assumption that we can make about contact between individuals is that
individuals mix randomly: for example, that an old person is as likely to contact a young
person as they are to contact another old person. This is analogous to the mass action
principle that is used in the physical sciences. According to this assumption, the risk of
infection at a given time is proportional to the number of infectious individuals at that time,
i.e.
t = It

Equation 1

Therefore, as shown in Figure 10, the risk of infection increases linearly as the number of
infectious individuals increases.

Figure 10. An illustration of how the risk of infection might change as the number of infectious individuals
increases, according to the equation t = I t.

As described in chapter section 2.7.1 of the recommended course text 22 , the precise
verbal definition of is as the per capita (or per person) number of effective contacts made
by a given person per unit time. This definition is equivalent to therate at which two
specific individuals come into effective contact per unit time. In the literature, it is also
known as the "transmission rate", the "transmission parameter" or the "transmission
probability".
In the next few pages, we will show how we can obtain an expression for from its verbal
definition. During the course it will usually be referred to as the "rate at which two specific
individuals come into effective contact per unit time".

Technical note
In the formulation used in Equation 1, the risk of infection is said to be density
dependent. Another formulation is used to describe transmission of sexually-transmitted
infections, whereby the risk of infection is assumed to be frequency dependent. This
formulation is discussed in MD08 . Panel 2.5 of the recommended course text
discusses these two approaches in further detail22 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.4: Step 5. Model quantification: calculating the risk (force)


of infection
page 40 of 80 11.1

11.2

11.3

11.4

prev

next

Of all the parameters that are used in models, is the most difficult to estimate. As
discussed on page 38 , will depend on the infection and the setting.
To estimate , we use two other relationships:
ecr
N

Equation 2

R0 = ecr D

Equation 3

where:
ecr is the average number of effective contacts (i.e. contacts that would lead to
transmission if they took place between an infectious and a susceptible person)
made by each person each day;
N is the population size;
R0 is the basic reproduction number (pronounced R nought or R zero) and is the
average number of secondary infectious individuals that would result from the
introduction of an infectious person into a completely susceptible population; and
D is the duration of infectiousness, in days.
We derive these equations in the next few pages and use them to show that is related to
R0, N and D through the equation:
=

R0
ND

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.5: Step 5. Model quantification: calculating the risk (force)


of infection
page 41 of 80 11.1

11.2

11.3

11.4

1. Derivation of the
equation =

11.5

prev

next

ecr
N

If, in a hypothetical population of size N, each person "effectively contacts" ecr other
people per unit time, then the per capita rate at which the two specific people will come
into effective contact each time step () must be:
=

ecr
N

For example, in the population on the


right, each individual effectively contacts
two others per day. The per capita rate
would effectively
that a susceptible
contact one of the infectious
individuals is the number of effective
contacts per day (2) divided by the
population size (12), so:
=

ecr
N

= 2/12
16.7% per person per day
For our measles problem , for which the population size (N) was 100,000, then if we
assume that ecr = 2 per day, we obtain the following value for :
= 2/100,000 = 0.00002 per person per day

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.6: Step 5. Model quantification: calculating the risk (force)


of infection
page 42 of 80 11.1

11.2

11.3

2. Derivation of the
equation

11.4

11.5

11.6

prev

next

R0 = ecrD

R0 is the average number of secondary infectious individuals that would result from one
infectious person during the entire infectious period when introduced into a completely
susceptible population. Therefore, for infections for which all of those infected become
infectious, it is related to the average effective contact rate (ecr) and the duration of the
infectious period D, as follows:
R0 = ecrD
Rearranging this equation gives:
ecr =

R0
D

For our measles example, if the number of secondary infectious individuals resulting from
the introduction of one infectious person during the entire infectious period after being
introduced into a totally susceptible population (R0) is 14, and the duration of the infectious
period D is 7 days, then the average number of individuals effectively contacted by each
person during each day (ecr) is:
ecr =

R0
D

= 14 infectious individuals/ 7 days


= 2 effective contacts during each day

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

11.7: Step 5. Model quantification: calculating the risk (force)


of infection
page 43 of 80 11.1

11.2

11.3

11.4

11.5

11.6

11.7

prev

next

By substituting our expression for ecr (R0 /D) into the equation for (ecr/N), we obtain the
expression we need for , using parameters that we can estimate (R0, N, D), i.e.
=

(R0 I D)
R0
=
N
ND

Equation 4

For our measles problem , if R0 =14, D = 7 days and N = 100,000, then after
substituting these values into Equation 4, we obtain the following value for :
=

14
= 0.00002 per person per day
100,000 7

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 12: Step 5. Model quantification: estimating


transition parameters (rates vs. risks)
page 44 of 80

prev

next

Technically, the transition parameters used in difference equations should be risks (i.e. the
number of pre-infectious individuals at time t who become infectious by time t+1 is given
by the number pre-infectious at time t multiplied by the proportion who become infectious
between time t and t+1). However, if the rate is small (<10%), risks and rates are
approximately the same (see Appendix for the derivation).
Consequently, difference equations tend to use transition rates rather than risks since they
are relatively easy to calculate from data on the time until an event occurs or the duration
of an event. In general, the rate at which something occurs can be calculated from the
average time until it occurs using the following equation:
Rate at which the event occurs = 1/ (time until the event occurs)
The rate at which individuals become infectious can therefore be calculated from the
average pre-infectious period, i.e. the average time until those newly infected become
infectious. Similarly the rate at which individuals recover from being infectious can be
obtained from the average infectious period, and the mortality rates can be derived from
the average "period of life" (i.e. life expectancy) as follows:
Rate at which individuals become infectious = 1/ (average pre-infectious period)
Recovery rate = 1/ (average duration of infectiousness)
Mortality rate = 1/ (average life expectancy)
This relationship is discussed further in the recommended course text 22 , (page 57 and
Appendix A1.3). You may prefer to postpone reading this until you have completed the
session on differential equations (MD02).

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

12.1: Exercise: transition parameters


page 45 of 80 12.1

prev

next

As discussed on page 14 , the average pre-infectious and infectious periods for measles
are 8 and 7 days, respectively.
Using these facts, answer the following:
Q1.5
a) What is the rate at which individuals become infectious in units of per day?
Answer

b) What is the rate at which infectious individuals recover from being infectious in
units of per day?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

12.2: Exercise: transition parameters


page 46 of 80 12.1

12.2

prev

next

In Q1.5 on the previous page, we calculated the daily rate at which something occurred.
We can calculate the corresponding rate for other time units simply by scaling the daily
rate accordingly.
For example, to calculate the rate per half day, we would just need to multiply the daily rate
by 0.5. To calculate the rate per week, we would multiply the daily rate by 7. Considering
the last question, for example, the rate at which newly infected individuals become
infectious would be calculated as 7/8 = 0.875 per week.
Similarly, if the life expectancy of a population is 60 years, the average mortality rate is:
= 1/(average life expectancy)
= 1/(60 years)
= 1/(60365) = 0.000046 per day
Note about scaling
Note that the scaling described above has to be within certain limits. For example, if preinfectious individuals become infectious at a rate of 2% per day, it would be inappropriate
to say that the rate per 200 days is 2200 = 400% per 200 days. See Appendix for
further details about the relationship between risks and rates.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

12.3: Step 5. Model quantification: estimating transition


parameters (rates vs. risks)
page 47 of 80 12.1

12.2

12.3

prev

next

When defining the model, you should ensure that the units are consistent with the size of
the time step. Therefore, if the equations use 1 day time steps, then the rate at which
individuals become infectious should also be a daily rate.
When we assume that
something occurs at a constant
rate, then it can be shown that
we are implicitly assuming that
the distribution of the time until
each event occurs follows an
exponential distribution, as
seen on the right. The details of
how we can obtain this result
are not shown here. However,
you can see section 3.5.1 of
the recommended course text 22
for further details. You may
prefer to read this section after
you have completed the next
session (MD02).
While this assumption may not
be completely realistic, it is
generally adequate for many
modelling studies, especially
those looking at the long-term
dynamics of acute immunising
infections.
Situations for which this
assumption is not appropriate
are described in later sessions
and the recommended course
text 22 .

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

12.4: The final stages in model development


page 48 of 80 12.1

12.2

12.3

12.4

prev

next

We have now completed steps 1-5 in the process of model development that we discussed
on page 10 . We will now briefly discuss the final stages, namely those of Model
validation, Prediction and optimisation, Decision making and model transfer. These steps
will be discussed in further detail in later sessions of this module.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 13: Step 6. Model validation


page 49 of 80

prev

next

A fully quantified model is not necessarily a valid model. Model validation involves
comparing model outputs against independent data sets. For example, in a model
describing HIV transmission you could check to see if the sexual behaviour you are
modelling is consistent with the available data. You could also check to see if it predicts
values for the prevalence of HIV infection which are consistent with observed data.
If we were describing the transmission of measles or another immunising infection, we
would want to check that the model prediction of the proportion immune was consistent
with observed serological data.
At this stage, model outputs should also be exposed to criticism from experts in the field.
If the model output fails to match the observed data, then acceptable explanations need to
be found and assumptions and/or errors in the model need to be corrected before
proceeding to the next stage.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 14: Step 7. Prediction and Optimisation


page 50 of 80

prev

next

The model should only be used to make predictions of the effectiveness of interventions
after the model has been validated. Prediction is likely to depend critically on the
assumptions of the model, some of which may not be accurately known. These
assumptions can be tested through a sensitivity analysis in which the model is run with
different plausible combinations of the parameter values.
For example, if we are comparing the effectiveness of various control strategies, a
sensitivity analysis can provide a range in the estimated effectiveness of the different
strategies. However, if one approach is always the most effective in all sensitivity analysis
scenarios, you could report these outcomes with some confidence, even though the
absolute level of effectiveness remains uncertain.
We now return to our measles question. If we incorporate the parameter values for
measles (R0, the pre-infectious and infectious periods and the total population size) into
our difference equation model, we obtain the following plot of the number of susceptible,
pre-infectious, infectious and immune individuals.

Figure 11. Predictions of the number of susceptible, pre-infectious, infectious and immune individuals obtained
using the difference equations on page 34 , assuming that R0 = 14, the pre-infectious period = 8 days, the
infectious period = 7 days, and that 1 infectious person enters a totally susceptible population with 100,000
individuals.

For example, we see that the model predicts that the number of pre-infectious and
infectious individuals should increase gradually over time, and would peak on about days
35 and 40 respectively. The number of susceptible individuals is predicted to decrease
slowly for the first 20 days, but would then be close to zero by day 40; the opposite pattern
(i.e. slow initial increase, followed by an accelerated increase) is predicted for the immune

individuals.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 15: Steps 8 & 9. Decision making and Model transfer


page 51 of 80

prev

next

Predictions that are actually useful in decision-making need to be understandable to field


workers and managers. A purely technical/mathematical description of the model is not
sufficient for non-technical individuals.
If the model design and quantification are not likely to change significantly in the near
future, the model can be transferred to managers of control programmes. For this to be
successful, a user-friendly and accessible interface will be required along with explanatory
user manuals.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 16: Summary


page 52 of 80

prev

next

We now summarise the key messages that you should have obtained by now, before
proceeding to the practical part of this session, in which you will practise setting up a
model in Excel.
1. The first steps in setting up a model which describes the transmission of an infection
include identifying the question that should be addressed, collecting the relevant
information and deciding on the structure of the model.
2. The structure of the model is determined by several factors, such as the natural
history of the infection (whether it is classed as SI, SIR, SEIR, SEIRS etc.) and the
question to be addressed.
3. Models can be either deterministic (describing what happens on average in the
population) or stochastic (incorporating the effect of chance and indicating the range
in which given outcomes might lie).
4. Deterministic models are set up using difference equations (covered in this session)
or differential equations (covered in the next session).
5. Difference equations describe the number of individuals in a given category at time
t+1 in terms of the number at a previous time and the number who leave or enter the
category between time t and t+1. Note that it is up to the modeller to decide which
unit of time - e.g. an hour, a day, or a week - is appropriate to use.
6. The difference equations describing the transmission dynamics of an immunising
infection, such as measles, in a closed population , are as follows:
S t+1 = S t - tS t
E t+1 = E t+ tS t - fE t
I t+1 = I t+ fE t - rI t
Rt+1 = Rt+ rI t
where
S t is the number of individuals who are susceptible at time t;
E t is the number of individuals who are pre-infectious at time t;
I t is the number of individuals who are infectious at time t;
Rt is the number of individuals who are recovered (i.e. are immune) at
time t.

t is the incidence risk or the risk of a susceptible individual becoming


infected between t and t+1. For historical reasons it is also called the
force of infection by modellers (this is discussed in later sessions).
f is the proportion (or risk) of pre-infectious individuals becoming
infectious between time t and t+1.
r is the proportion (or risk) of infectious individuals recovering (becoming
immune) between time t and t+1.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

16.1: Summary
page 53 of 80 16.1

prev

next

7. The risk of infection ( t) is often calculated assuming that individuals mix randomly,
according to the mass action principle, so that it is proportional to the number of
infectious individuals at time t (I t), i.e.
t = I t
where is the (per capita) rate at which two specific individuals come into
effective contact per unit time. With this assumption, the difference equations
for the number of susceptible and pre-infectious individuals at time t+1 can be
rewritten as follows:
S t+1 = S t - I tS t
E t+1 = E t + I tS t - f E t
8. Technically, the parameters which go into difference equations should be risks;
however, the corresponding rates are often used, since if the rate is small, the value
for the risk and the rate is approximately equal.
9. The rate at which a pre-infectious individual becomes infectious per unit time (f) and
the rate at which infectious individuals recover to become immune (r) can be
calculated using the equations:
f = 1/(average pre-infectious period)
r = 1/(average infectious period)

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

16.2: Summary
page 54 of 80 16.1

16.2

prev

next

10. can be calculated from the following two equations:


=

R0
ND

or

ecr
N

where

N is the total population size;


D is the duration of infectiousness;
R0 is the number of secondary infectious individuals resulting from the
introduction of one infectious person into a totally susceptible population;
and
ecr is the average number of individuals effectively contacted by each
person per unit time. An "effective contact" is an interaction that would
lead to transmission if it took place between an infectious and a
susceptible person.

11. The effective contact rate (ecr), D and R0 are related through the following equation:
ecr =

R0
D

12. Once all the input parameters for a model have been identified (i.e. the model has
been "quantified"), the model needs to be "validated", whereby model outputs are
compared against independent datasets and any errors are corrected.
13. Once the model has been validated, the model can be used for predicting the impact
of different interventions or other outcomes of interest.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 17: Break...


page 55 of 80

prev

The rest of this session (the practical component) is likely to take 1 - 3 hours
You may wish to take a short break before starting it.

next

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 18: Practical: Setting up and interpreting simple


models (Measles in Excel)
page 56 of 80

prev

next

OVERVIEW
We now begin the practical component of this session, in which we will set up the model
describing the transmission of measles that we discussed in the first part of this session, in
Excel.
OBJECTIVES
By the end of this part of the session, you should:
Understand the mechanics of setting up simple models describing the transmission
of immunising infections using difference equations in Excel; and
Understand the relationships between key input parameters in the model.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

18.1: Practical: Setting up and interpreting simple models


(Measles in Excel)
page 57 of 80 18.1

prev

next

INTRODUCTION
Recall the following model and difference equations describing measles transmission in a
closed population from earlier in the session.

S t+1 = S t - tS t
E t+1 = E t+ tS t - fE t
I t+1 = I t+ fE t - rI t
Rt+1 = Rt+ rI t

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

18.2: Practical: Setting up and interpreting simple models


(Measles in Excel)
page 58 of 80 18.1

18.2

prev

next

INTRODUCTION CTD.
Assuming that individuals mix randomly (i.e. that t = I t), the first two expressions (for S t+1
and E t+1 ) can be rewritten as:
S t+1 = S t - I tS t
E t+1 = E t+ I tS t - f E t
In these equations, we use the following definitions:
S t, E t, I t and Rt are the number of susceptible, pre-infectious, infectious and immune
(recovered) individuals respectively at time t;
t is the risk that a susceptible person is newly infected between time t and t+1;
is the rate at which a specific infectious and susceptible individual come into
effective contact between time t and t+1;
f is the proportion of pre-infectious individuals who become infectious between time t
and t+1; and
r is the proportion of infectious individuals who recover (become immune) between
time t and t+1.
We will now set up this model in Excel.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 19: Title: Practical: Setting up difference equations


in Excel
page 59 of 80
1. Open the spreadsheet measles1.xlsx
layout resembles the following:
The yellow cells (rows 38) show the key input
parameters in the model:
The total

population size
(cell F5),
R0 (cell F8),
the average preinfectious and

infectious periods
(cells F6 & F7)
These cells have been
assigned the names

indicated in column G.
Click here to highlight
the names given to the
parameters (column G).
The " Name Box" (to the
left of the fx field) will
show the name of the
currently selected cell. If
a cell has been given a
name, we can use the
name of that cell, rather
than the cell location, if
we wish to refer to that
cell in an equation.

prev

next

. You should see a spreadsheet whose

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

19.1: Practical: Setting up difference equations in Excel


page 60 of 80 19.1

prev

next

We will now use the input parameters in the yellow cells to calculate other parameters that
we use in our difference equations, which will be in the blue cells. These determine the
number of individuals who are newly infected, become infectious and recover per unit time.
If necessary, click here to remind yourself of how to type in equations into a cell, before
proceeding to the question below..
Q2.1
In the blue cells (rows
11-14), use the
equations provided on
pages 53 and 54 to
set up the appropriate
Excel formulae for the
following in terms of the
parameters in the yellow
cells:
a)The number of
individuals effectively
contacted by each
person per day (ecr ) in
cell F11;
b)The rate at which two
specific individuals
come into effective
contact per day (beta )
in cell F12;
c) The average rate at
which individuals
become infectious per
day (infous_rate ) in
cell F13; and
d)The average recovery
rate per day (rec_rate)
in cell F14.
As stated before, the
names given to the
parameters are provided
in column G.

Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

19.2: Practical: Setting up difference equations in Excel


page 61 of 80 19.1

19.2

prev

next

The lilac cells (starting in row 43) will contain the number of individuals who are
susceptible, pre-infectious, infectious and immune on days 0, 1, 2, etc. The initial number
of individuals on day 0 are shown.
Q2.2
In the indicated cells,
enter the Excel formulae
for:
a)The number of
susceptibles on day 1
(in terms of beta and
the number of
individuals who are
susceptible and
infectious on day 0) in
cell B46 .
b)The number of
individuals who are
pre-infectious on day 1
(in terms of beta,
infous_rate and the
number of individuals
who are susceptible,
pre-infectious and
infectious on day 0) in
cell C46 .
c)The number of
individuals who are
infectious on day 1 (in
terms of infous_rate,
rec_rate, and the
number of individuals
who are pre-infectious
and infectious on day
0) in cell D46 .
d)The number of
individuals who are
immune on day 1 (in
terms of rec_rate and
the number of
individuals who are
infectious and immune
on day 0) in cell E46 .
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

19.3: Practical: Setting up difference equations in Excel


page 62 of 80 19.1

19.2

19.3

prev

next

2. Now copy the expressions you have just set up for day 1 down until day 200. Click
here and go to page 8 if you need to remind yourself of methods for copying in
Excel. Then select columns H and P together, click with the right mouse button and
select the "Unhide" option. You should see a graph of the number of susceptible,
infectious and immune individuals over time.
Click the show button below to check your graph. If your graph doesn't resemble this
figure, click here to see the spreadsheet that you should have set up by now.
Show

Q2.3 What do you notice about the number of infectious individuals? Why do no further
infectious individuals occur in this population after a certain time? At which time are there
no infectious individuals in the population?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

19.4: Practical: Setting up difference equations in Excel


page 63 of 80 19.1

19.2

19.3

19.4

prev

next

We will now explore how changing the pre-infectious period affects the predicted numbers
of susceptible, infectious and immune individuals.
Q2.4 How does the graph change if you change the pre-infectious period (cell F6) to be:
a) 20 days?
b) 5 days?
Answer

3. Change the pre-infectious period back to 8 days before continuing.


You may now like to save your spreadsheet to a convenient location, such as your hard
disk.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

19.5: Practical: Setting up difference equations in Excel


page 64 of 80 19.1

19.2

19.3

19.4

19.5

prev

next

Q2.5 Which assumptions would you incorporate into the model in order to describe the
transmission dynamics of measles in a large population (e.g. a town or country) over a
period of years?
Note: You are not expected to make these changes yet!
Answer

We will now adapt the model to incorporate births into and deaths out of the population so
that we can model the transmission dynamics of measles over very long time periods (i.e.
spanning decades).

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 20: Practical: Incorporating births and deaths


page 65 of 80

prev

next

1. Return to the spreadsheet that you have been working with (measles1.xlsx). Before
continuing, check that the parameter values are identical to the values assumed at
the start (pre-infectious period = 8 days, the infectious period = 7 days, R0 = 13).
2. Select rows 8 and 10 together, click with the right mouse button, and select the
"Unhide" option to reveal row 9. Likewise, repeat these steps for rows 14 and 19.
You should now see cells for the life expectancy (currently = 70 years), the average
mortality and birth rates and the number of births in this population per day.
3. Type in the appropriate formula for the average daily mortality rate in cell F15 in
terms of the life expectancy.
Answer

Q2.6 Assuming that the population size does not change over time (number of births =
number of deaths), what should be the daily per capita birth rate?
Answer

4. Set up the appropriate (Excel) formula in the cell for the birth rate (F16) and the
number of births per day (in cell F17).
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.1: Practical: Incorporating births and deaths


page 66 of 80 20.1

prev

next

For now, we will assume that all individuals are born susceptible in this population.
Q2.7 Is this assumption realistic? Is it a reasonable assumption to make? What alternative
assumptions might be appropriate?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.2: Practical: Incorporating births and deaths


page 67 of 80 20.1

20.2

prev

next

As we saw on pages 57 and 58 the following are the difference equations describing the
transmission dynamics of measles in a closed population:
S t+1 = S t - ItS t

Equation 1

E t+1 = E t+ ItS t - fE t

Equation 2

I t+1 = I t+ fE t - rI t

Equation 3

Rt+1 = Rt+ rI t

Equation 4

Q2.8 Using pen and paper, write down the expression for the following in terms of m_rate
(i.e. the mortality rate):
a) The number of susceptibles who die per unit time
b) The number of pre-infectious individuals who die per unit time
c) The number of infectious individuals who die per unit time
d) The number of immune individuals who die per unit time
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.3: Practical: Incorporating births and deaths


page 68 of 80 20.1

20.2

20.3

prev

Q2.9 Drag and drop the terms from the term bank into the empty boxes to change
equations 1-4 to include the number of births and the number of deaths from the
population at each time step.

Reset

Answer

next

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.4: Practical: Incorporating births and deaths


page 69 of 80 20.1

20.2

20.3

20.4

prev

next

5. Returning to the spreadsheet that you have been working with (measles1.xlsx),
change the equations for the numbers of susceptible, pre-infectious, infectious and
immune individuals on day 1 (cells B46, C46, D46 and E46) in order to deal with
births into and deaths out of the population. Copy these formulae respectively until
the 200 th day.
Click on the Show button below to check your formulae.
Show

Click here

if you want to check your answer by looking at the spreadsheet.

Q2.10 How does incorporating births and deaths in the population change your model
prediction of the number of susceptible, infectious and immune people over time? How
would your predictions change if you were to simulate the dynamics of measles for 10
years? Or for 50 years?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.5: Practical: Incorporating births and deaths


page 70 of 80 20.1

20.2

20.3

20.4

20.5

prev

next

We will now simulate the infection dynamics for a longer time period (i.e. 50 years).
6. Copy the formulae in the cells for t=200 until t=18250 days (i.e. 365 x 50 days or 50
years). Select rows 20 and 40 together, right click and select the "Unhide" option.
You should see a graph similar to the one below of the number of individuals who
are susceptible and immune for the entire 50 year period.

Figure 12. Prediction of the number of susceptible and immune people over time, obtained using the measles
model that youve set up so far.

If your figure does not resemble this figure, click here


the version that you should have set up so far.

to check your spreadsheet against

Q2.11 What do you see on the graph? How are the changes in the number of susceptibles
and immune related?
Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

20.6: Practical: Incorporating births and deaths


page 71 of 80 20.1

20.2

20.3

20.4

20.5

20.6

prev

next

It is possible to copy the formulae down for an even longer time period (i.e. 100 years =
36500 days) to predict how the numbers of infectious individuals will change. However,
this would make the spreadsheet quite large and possibly unmanageable.
An alternative is to take larger (e.g. 2, 3 or longer) time steps in the model. In order to do
this, you need to convert the parameters currently used in the model into parameters
appropriate for larger time steps. Another option is to reformulate the equations using
differential equations (with a software package specially designed to deal with this
problem).
We shall discuss this approach in the next session. However, in the next two pages, we
will illustrate how you can do this in Excel, and we will show a problem which can occur if
the time step is too large.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 21: Practical: Changing the size of the time steps in


the model
page 72 of 80

prev

next

To change the size of the time step, we need to make some further alterations to the
spreadsheet. You can do this by following the steps below. Otherwise, click here to
open the file measlfin.xlsx, which already has these expressions set up and check that
you understand their logic.
In order to convert a daily transition rate into that for a different-sized time step, you just
need to multiply it by the size of the time step. For example, if 5% of pre-infectious
individuals become infectious each day, then approximately 35 = 15% of them should be
infectious by the third day (but you should note that this is not appropriate for long time
steps -see Appendix for further details).
The size of the time step in cell F4 has been labelled "t_step". Change the value for t_step
to equal values in the range of 1-4 days, after making the changes listed below.
7. Amend the equations for the following parameters (by multiplying by "t_step" if
necessary) to be in terms of t_step:
a) The number of individuals effectively contacted per time step,
b) The rate at which 2 specific individuals come into effective contact per unit time,
c) The average rate at which a pre-infectious individual becomes infectious, and
d) The average rate at which an infectious person recovers to become immune, and
e) The per capita mortality rate.
Click below to check your answers.
Show

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

21.2: Practical: Changing the size of the time steps in the


model
page 73 of 80 21.1

prev

next

Q2.12 Does changing the time step to 2 days influence the predicted cycles in the
numbers of infectious individuals? What happens when you change the time step to 3, 4
or 5 days? Why?
Answer

Q2.13 Is it sensible to take time steps of 10 days? Why?


Answer

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 22: Final words and next steps


page 74 of 80

prev

next

We have now covered the key steps that are used in setting up models, and have
discussed the key input parameters which go into models (click here to see the
summary).
In the second part of this session, we have also seen how a model describing the
transmission of an immunising infection can be set up using difference equations in Excel.
The same approach can be used to set up simple models using appropriate difference
equations for many different kinds of infections.
In the next session, you will see how you can set up deterministic models using differential
equations, which describe events occurring continuously, rather than at discrete time
intervals.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Section 23: Further reading and exercises


page 75 of 80

prev

next

Chapter 2 of the recommended course text 22 covers the issues covered in this session in
further depth. It discusses how we might follow the steps discussed in this session to
develop a model of the transmission of influenza. Please read that chapter and try the
exercises at the end of the chapter to consolidate the material that we have covered in this
session.
The online exercises associated with Model 2.1 of the recommended course text 22
provide further practice in working with SEIR and SIR models using difference equations in
Excel, and considers a model describing the transmission of influenza. Please try these
exercises to help reinforce what you have learned in this session.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

References
page 76 of 80

prev

next

1. Johnson NP, Mueller J. Updating the accounts: global mortality of the 1918-1920
"Spanish" influenza pandemic. Bull Hist Med 2002; 76(1):105-115.
2. Bell DM. Public health interventions and SARS spread, 2003. Emerg Infect Dis 2004;
10(11):1900-1906.
3. World Health Organization. Responding to the avian influenza pandemic threat.
Recommended strategic actions. WHO/CDS/CSR/GIP/2005.8. 2005.

http://www.who.int/csr/resources/publications/influenza/WHO_CDS_CSR_GIP_05_8EN.pdf . 3-5-2008.
4. Osterhaus AD. Pre- or post-pandemic influenza vaccine? Vaccine 2007;
25(27):4983-4984.
5. Cooper BS, Pitman RJ, Edmunds WJ, Gay NJ. Delaying the international spread of
pandemic influenza. PLoS Med 2006; 3(6):e212.
6. Glezen WP. Emerging infections: pandemic influenza. Epidemiol Rev 1996;
18(1):64-76.
7. Osterhaus AD. Pre- or post-pandemic influenza vaccine? Vaccine 2007;
25(27):4983-4984.
8. Mounier-Jack S, Coker RJ. How prepared is Europe for pandemic influenza?
Analysis of national plans. Lancet 2006; 367(9520):1405-1411.
9. Ferguson NM, Cummings DA, Cauchemez S et al. Strategies for containing an
emerging influenza pandemic in Southeast Asia. Nature 2005; 437(7056):209-214.
10. Ferguson NM, Cummings DA, Fraser C, Cajka JC, Cooley PC, Burke DS. Strategies
for mitigating an influenza pandemic. Nature 2006; 442(7101):448-452.
11. Halloran ME, Ferguson NM, Eubank S et al. Modeling targeted layered containment
of an influenza pandemic in the United States. Proc Natl Acad Sci U S A 2008.
12. Hatchett RJ, Mecher CE, Lipsitch M. Public health interventions and epidemic
intensity during the 1918 influenza pandemic. Proc Natl Acad Sci U S A 2007;
104(18):7582-7587.
13. Longini IM, Jr., Nizam A, Xu S et al. Containing pandemic influenza at the source.
Science 2005; 309(5737):1083-1087.
14. Cooper BS, Pitman RJ, Edmunds WJ, Gay NJ. Delaying the international spread of
pandemic influenza. PLoS Med 2006; 3(6):e212.
15. Ferguson NM, Cummings DA, Cauchemez S et al. Strategies for containing an
emerging influenza pandemic in Southeast Asia. Nature 2005; 437(7056):209-214.
16. Longini IM, Jr., Nizam A, Xu S et al. Containing pandemic influenza at the source.
Science 2005; 309(5737):1083-1087.
17. Cooper BS, Pitman RJ, Edmunds WJ, Gay NJ. Delaying the international spread of
pandemic influenza. PLoS Med 2006; 3(6):e212.
18. Hollingsworth TD, Ferguson NM, Anderson RM. Will travel restrictions control the
international spread of pandemic influenza? NatMed 2006; 12(5): 497-9

19. Habbema, J. D. F., et al. (1996). The microsimulation approach to epidemiologic


modeling of helminthic infections, with special reference to schistosomiasis. Am. J.
Trop. Med. Hyg. 55(5): 165-169.
20. Korenromp, E. L., C. Van Vliet, et al. (2000). HIV spread and partnership reduction
for different patterns of sexual behaviour - a study with the microsimulation model
STDSIM. Mathematical Population Studies 8(2): 135-173.
21. Bailey, N. T. J. (1975). The mathematical theory of infectious diseases and its
applications. 2nd ed.
22. Vynnycky, E and White, RG. An Introduction to Infectious Disease Modelling. Oxford
University Press 2010.
23. Abbey H. An examination of the Reed-Frost theory of epidemics. Human Biology,
1952;24:201-2339;
24. van Geuns HA, Meijer J, Styblo K (1975). Results of contact examination in
Rotterdam, 1967-1969. Bull Int Union Tuberc. 50(1):107-21
25. Dowdle WR, Ferrera W, et al. (1970). WHO collaborative study on the seroepidemiology of rubella in Caribbean and Middle and South American populations in
1968. Bull World Health Organ. 42(3):419-22.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Appendix: The relationship between risks and rates


page 77 of 80

prev

next

Here we show that risks and rates are related through the equation:
risk = 1- e -(time period x rate)
and that for small values for the rate, the risk per unit time and the rate are approximately
equal, i.e. risk rate.
We begin by considering a population of S 0 susceptible individuals who become infected
at a constant rate . If we plot the number of susceptible individuals over time, then we
would obtain a plot which is similar to the following:

Figure A1. Illustration of how the number of susceptible individuals would change over time, if they are infected at
some constant rate.

As we shall see in the session on differential equations, the number of susceptible


individuals at time t is given by the equation S 0e - t
Substituting for t=1 into this expression, we see that the number susceptible at time t=1 is
given by the equation S 0e -

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Appendix: The relationship between risks and rates


page 78 of 80 appendix.1

prev

next

The risk of infection between time 0 and time t=1 can be calculated as the number who
have been infected by time t=1 divided by the number who were susceptible at the start, or
equivalently the length of line A divided by the length of line B, as shown in the following
figure.

Figure A2: Illustration of how the risk of infection is calculated. The risk of infection between time t=0 and t=1 is
equal to the length of line A divided by the length of line B.

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Appendix: The relationship between risks and rates


page 79 of 80 appendix.1

appendix.2

prev

next

The length of line B is equal to S 0. The number who have been infected by time t=1 (i.e.
the length of line A) is simply given by the difference between the number who were
susceptible at the start (S 0) and the number susceptible at time t=1, i.e.
S 0 S 0e -
Dividing this expression by the number who were susceptible at the start, we obtain the
following equation for the risk of infection between time t=0 and t=1:
risk of infection between time t=0 and
t=1

S 0 - S 0e -
S0

= 1 - e-

Similarly, the risk of infection between timet=0 and t=Tis given by 1 - e - T

Equation
A1

MD01 Basic modelling methods I: an


introduction to difference equations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Content

Module Map

Glossary

Tools

Help

Appendix: The relationship between risks and rates


page 80 of 80 appendix.1

appendix.2

appendix.3

prev

Figure A3 shows how the risk per unit time is related to the rate . For small values of the
rate (<0.1 per unit time), the value for the risk per unit time is approximately equal to the
rate. However, as the rate increases, the difference between the rate and the risk also
increases. For example, if the rate is 0.2 per unit time, then the risk is about 0.18 per time
step.

The mathematical explanation for the size of


the difference between risks and rates when
the rate is small or large can be obtained by
using the mathematical definition of "e".
For example, adapting the equations in section
-
9 of the maths refresher , e is given by the
equation:

If the rate is sufficiently small (e.g. <0.1 per


unit time), then the terms

etc.

contribute a negligible amount to the


expression and hence
e - 1 -
Substituting this approximation for e - into
Equation A1 for the risk of infection per time
step, we see that:

Figure A3. Illustration of the relationship between risks and rates

risk = 1- e - 1- (1 - ) =
Similarly, we see that the risk over time periodT is given by 1- e -T 1- (1 - T) =
T.However, it should be noted that as T increases the approximation becomes less good,
and the simple relationship, risk=T, breaks down.

You might also like