Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MD 07

Download as pdf or txt
Download as pdf or txt
You are on page 1of 109

MD07 Calculating R 0 for non-randomly

mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 1: Overview and objectives


page 1 of 97

next

OVERVIEW
In MD06, we saw how assumptions about the amount of contact between individuals
influenced model predictions of the effect of vaccination. This suggests that contact
patterns determine the herd immunity threshold and therefore R0. In this session we
illustrate how we can calculate R0 to take account of different contact patterns.
OBJECTIVES
By the end of this session you should:
Know the importance of accounting for non-random mixing between individuals when
calculating the basic reproduction number and the critical vaccination coverage
required for controlling transmission.
Be able to calculate the basic reproduction number and herd immunity threshold,
assuming either that individuals mix randomly or non-randomly.
Know how reproduction number estimates are currently used to estimate the
potential for a measles epidemic to occur in England.
This session is made up of 2 parts and is likely to take 2-5 hours to complete.
The first part (1-2 hours) describes the theory for calculating R0 and describes how
calculations of the reproduction number are presently used in England to assess the
potential for a measles epidemic to occur.
The second part (1-2 hours) consists of a practical exercise in Excel, providing you with
further practice in calculating the basic and net reproduction numbers.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 2: Introduction
page 2 of 97

prev

next

In the previous session , we explored the impact of different levels of rubella vaccination
coverage among newborns in a population in which individuals were stratified into the
young, middle-aged and old (denoted by the symbols y, m and o) as shown in the model
diagram below.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

2.1: Introduction
page 3 of 97

prev

next

We assumed that the force of infection differed between the young, middle-aged, and old,
and was given by the following equations:
Force_of_infn_y = b_yy*Infous_y + b_ym*Infous_m + b_yo*Infous_o
Force_of_infn_m = b_my*Infous_y + b_mm*Infous_m + b_mo*Infous_o
Force_of_infn_o = b_oy*Infous_y + b_om*Infous_m + b_oo*Infous_o
Here, b_yy, b_ym etc represent the rate at which individuals in a given age group come
into effective contact with those in other age groups per unit time.
Individuals in different age categories were assumed to contact each other according to
Who Acquires Infection From Whom (WAIFW) matrices A and B (as shown below) where
the parameters (in units of per day) were calculated using the force of infection estimated
from data on rubella seroprevalence for England and Wales:

y
m
o

WAIFW A
m

y
1.81 10
0
0

-5

0
0
-5
2.92 10
0
0
3.35 10-5

y
m
o

WAIFW B
m

y
-5

-6

-6

1.66 10 4.16 10 4.16 10


4.16 10-6 4.16 10-6 4.16 10-6
4.16 10-6 4.16 10-6 4.16 10-6

Figure 1. Comparison between the WAIFW matrices A and B, which were calculated using the force of infection
estimated from rubella seroprevalence data from England and Wales in MD06 .

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

2.2: Introduction
page 4 of 97

prev

next

For both assumptions about contact, predictions of the age-specific proportion of


individuals who were susceptible and the daily number of new infections in the absence of
vaccination were identical. However, predictions of these statistics differed once
vaccination of newborns was introduced, as shown in Figure 2.
For example, if individuals were assumed to contact each other according to matrix
WAIFW A, then vaccination of newborns with a coverage of 86% was insufficient to control
transmission. In contrast, if individuals were assumed to contact each other according to
the WAIFW B matrix, transmission stopped shortly after the introduction of 86%
vaccination coverage among newborns.
The differences between the predictions obtained using matrices WAIFW A and WAIFW B
reflect differences in R0 and therefore the herd immunity threshold that is associated with
these two matrices. In fact, as we shall see later, R0 for WAIFW A and WAIFW B is about
10.9 and 3.64 respectively, which correspond to values of the herd immunity threshold of
91% and 73% respectively.
In this session, we will show you how we can estimate R0 for these and other assumptions
about contact between individuals.

Figure 2. Comparison
between predictions of the
daily number of new rubella
infections per 100,000
population, obtained
assuming that individuals
contacted each other
according to WAIFW
matrices A and B, using the
Berkeley Madonna models
from MD06 (see pages 54
and 58 respectively in
MD06).Vaccination of
newborns, with an effective
coverage of 86% is
introduced 100 years after
the start.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 3: R0, Rn and the herd immunity threshold


page 5 of 97

prev

next

Before illustrating how we can calculate R0 to take non-random mixing between individuals
into account, we first review the methods that are used to calculate R0 and how it is related
to Rn and the herd immunity threshold when we assume that individuals mix randomly.
You may find that you can skip through the next few pages quickly as you will have come
across most of the content previously.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.1: The basic reproduction number (R0)


page 6 of 97

prev

next

By now, you are probably familiar with the definition of the basic reproduction number (R0)
as the average number of secondary infectious individuals generated by a single typical
infectious person following his/her introduction into a totally susceptible population.
As we saw in MD03 , if we assume that individuals mix randomly, R0 can be calculated
using the following equation:
R0 = ND

Equation 1

where
is the rate at which two specific individuals come into effective contact per unit
time;
N is the population size;
D is the duration of infectiousness.
In a deterministic model, for the incidence to increase following the introduction of an
infectious person into a totally susceptible population, R0 must be bigger than one.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.2: The net reproduction number (Rn )


page 7 of 97

prev

next

If we assume that individuals mix randomly, R0 and the net reproduction number, Rn, are
related as follows:
Rn = R0 s

Equation 2

where s is the proportion of individuals who are susceptible in the population.


This expression provides a useful method for calculating the basic reproduction number.
For example, when the infection is at equilibrium, each infectious person will be leading to
one secondary infectious person. Thus the net reproduction number will then be equal to
1.
i.e.
Rn = 1
If we substitute for Rn = 1 into Equation 2 and then rearrange it slightly, we obtain the
following equation:
R0 = 1/s*

Equation 3

where s* is the proportion of the population that is susceptible to infection at equilibrium.


This expression leads to several other expressions for the basic reproduction number for
randomly-mixing populations, as we will show on the next few pages.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.3: Other expressions for R0, assuming that individuals mix


randomly
page 8 of 97

prev

next

As we saw in MD04 , the following expressions for R0 can be obtained for populations
whose age distributions are approximately rectangular or exponential, if we assume that
individuals mix randomly.
Rectangular age distributions: R0 L/A
Exponential age distributions: R0 1+L/A
where A is the average age at infection and L is the average life expectancy. Figure 3 and
Figure 4 summarise the relationship between A, L, and the proportion of the population
that is susceptible for populations with rectangular and exponential age distributions.
Figure 3

Figure 4

a) Rectangular age distribution

b) England and Wales: population by age, 1991

Figure 3. a) Illustration of the relationship between the proportion of the population that is susceptible and the life
expectancy in a population with a rectangular age distribution. The shaded area reflects the proportion of the population that
is susceptible. Adapted from Fine PEM (1993)1 b) Population in England and Wales, 1991. Data source: Office for
National Statistics.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.4: Other expressions for R0 assuming that individuals mix


randomly: N/(B(A-M))
page 9 of 97

prev

next

When the average age at infection A is small, another equation can be used regardless of
the age distribution in the population:

R0

N
B(A-M)

Equation 4

where
N is the population size;
B is the number of surviving infants;
M is the duration of maternal immunity;
and
A is the average age at infection (and is
small).

Click here to see the derivation.


.

Figure 5.Illustration of the relationship between the


proportion of the population that is susceptible, the duration
of maternally-derived immunity and the average age at
infection for a population with an unspecified demography.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.5: Other expressions for R0 assuming that individuals mix


randomly: 1/(1-i*)
page 10 of 97

prev

next

Another equation can be applied when the infection


does not confer immunity, i.e. when the appropriate
model would be of the SIS type, as seen in MD01
and illustrated in Figure 6.

In this instance R0 is given by the equation


R0=1/(1-i*)

Equation 6

Figure 6. The general structure of a Susceptible Infectious


Susceptible (SIS) model

where i* is the equilibrium prevalence of infection (or equivalently, of infectious individuals) in the population.
Click the show button below to see the derivation of this equation.
Show

IMPORTANT NOTE: These relatively simple equations assume that individuals in the
population mix randomly. If we cannot assume that individuals mix randomly, we need to
use an alternative approach, which we will discuss later.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 4: Herd immunity threshold


page 11 of 97

prev

next

Whilst R0 is useful for indicating the transmissibility of an infection, it can also be used to
determine the proportion of the overall population at which an intervention, such as
vaccination, needs to be targeted in order to control transmission.
As you will have learned in your previous training, the herd immunity threshold (H) is given
by the equation:
H=1-s* = 1-1/R0
For example, the basic reproduction number for measles in several settings has been
estimated to be about 13 (click here to see examples of estimated values for R0), which
suggests that the herd immunity threshold for measles is about:
100 x
(1-

1
) 92%
13

This suggests that, in these settings, over 92% of the population would need to be
effectively vaccinated in order to control transmission.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 5: Summary of the steps in calculating R0 - randomly


mixing population
page 12 of 97

prev

next

As we saw in MD04 , the following steps are required to calculate R0 if we assume that
individuals in a population mix randomly and that the infection is at equilibrium:
1. Measure the prevalence of previous infection in the population using a
seroprevalence survey.
2. Assuming that the population is at equilibrium, calculate s*, the proportion of the
population that is susceptible.
3. Calculate R0 using the expression R0= 1/s* (Equation 3 ).
Note that it is also possible to estimate R0 using the growth rate of an epidemic or
outbreak (see MD03 ) or using data on the secondary attack rate (see Fine, et al 2 ).

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.1: Summary of the steps in calculating R0 - assuming nonrandom mixing


page 13 of 97

prev

next

However, the situation is more complicated than that described on the previous pages if
we assume that individuals do not mix randomly. We then need to follow the steps below
in order to calculate R0:
1.
2.
3.
4.
5.
6.

Measure the prevalence of previous infection in the population using a serosurvey.


Estimate the forces of infection in different subgroups (e.g. age strata).
Choose the structure of the matrix of Who Acquires Infection From Whom (WAIFW).
Calculate the parameters for the WAIFW matrix.
Formulate the Next Generation Matrix.
Calculate R0 from the Next Generation Matrix.

Steps 1 - 4 have been covered in sessions MD04 and MD06. In this session we will deal
with steps 5 and 6.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.2: Non-random mixing and the Next Generation Matrix


page 14 of 97

prev

next

When we say that a population mixes nokn on-randomly, we imply that the population can
be divided into two or more subgroups and individuals in one subgroup have a different
amount of contact (e.g. mix more or less intensively) with individuals from their own
subgroup than with individuals from another subgroup.
The number of secondary infectious individuals generated by one infectious person
introduced into a totally susceptible population then depends on the subgroup to which
that person belongs.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.3: Non-random mixing and the Next Generation Matrix


page 15 of 97

prev

next

For example, in MD06 we considered the population in the diagram below, in which
individuals were stratified into the young and the old (or children and adults). In this
population, each infectious child generated a different number of secondary infectious
individuals from the number generated by an infectious adult.
Also, the number of secondary infectious children generated by each child differed from the
number of infectious adults that they generated.
As we shall show on the next few pages, we can summarise the number of infectious
children and adults generated by each child and adult using the Next Generation Matrix.
We can then use the matrix to calculate the basic reproduction number.
Population A

represents a child and a

Population B

represents an adult.

Figure 7: Diagram showing the contact patterns of two hypothetical populations considered in MD06 . In
population A, an infectious child could generate six secondary infectious individuals, four of which would be
children and two of which would be adults. An infectious adult in the same population, on the other hand, would
generate three infectious individuals, two of whom would be adults and one of whom would be a child.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.4: Non-random mixing and the Next Generation Matrix


page 16 of 97

prev

next

The Next Generation Matrix is defined as the matrix that summarises the number of
secondary infectious individuals in a given category resulting from infectious individuals in
each of the categories. For a population in which individuals are stratified into either the
"young" or the "old", it would be given by the following matrix:

Here,
Ryy is the number of young secondary infectious individuals generated by each
infectious young person;
Ryo is the number of young secondary infectious individuals generated by each
infectious old person;
Roy is the number of old secondary infectious individuals generated by each
infectious young person;
Roo is the number of old secondary infectious individuals generated by each
infectious old person.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.5: Non-random mixing and the Next Generation Matrix


page 17 of 97

prev

next

Notice the order of the subscripts used in the notation for the numbers (or "elements") in
the Next Generation Matrix on the last page. In each expression (e.g. Roy) the first
component of the subscript reflects the category of individuals among whom the secondary
infectious individuals occur (i.e. old individuals when considering Roy), and the second
component of the subscript reflects the category of the infectious person who is
transmitting the infection (i.e. young individuals when considering Roy).
As shown on the next page, the order of the subscripts used for Roy, Ryo, etc. is identical to
that used for the parameters.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 6: Summary of the notation used for the subscripts


page 18 of 97

prev

next

The following summarises the notation used for the parameters:

Therefore yo is the rate at which a specific young (susceptible) individual comes


into effective contact with a specific old (infectious) individual per unit time.
The following summarises the notation used for the Ryy, Ryo etc. elements of the Next
Generation Matrix:

Therefore Ryo is the number of secondary infectious individuals among young


individuals resulting from one old (infectious) individual in a totally susceptible
population.

Section 7: Next Generation Matrix example - exercise

1 of 1

file:///I:/DEP/SHARED/2013-14Final_ RESTRUCTURE/EPM302/EP...

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 7: Next Generation Matrix example - exercise


page 19 of 97

prev

next

We will now practice using the Next Generation Matrix notation. Below we show the two hypothetical mixing patterns that we
discussed on page 15 in which individuals are either children or adults.
Population A

Population B

Q1.1 The tabs below show examples of Next Generation Matrices. Click on the appropriate Next Generation Matrix for
1) Population A
2) Population B
from the options in the appropriate tab (tab 1 for population A, tab 2 for population B). Not every option will be used, and no
option will be used more than once.
Hint: The template for the Next Generation Matrix is shown at the top of the tab. The titles above the columns of the matrix refer
to the source of infection and the titles next to the rows of the matrix refer to the recipient of the infection.
1

1. Population A

Next
generation
matrix

child adult
child
adult

a)

c)

e)

g)

b)

d)

f)

h)

04/04/2014 16:06

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 8: Writing the Next Generation Matrix


page 20 of 97

prev

next

Each of the numbers in the Next Generation Matrix can be expressed in terms of the
following:
a) The parameters of the WAIFW matrix describing contact between the young and
old;
b) The numbers of individuals in each age group; and
c) The duration of infectiousness.
We derive the expressions on the next few pages.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.1: Writing the Next Generation Matrix


page 21 of 97

As discussed previously
using Equation 1:
R0 = ND

prev

next

, if we assume that individuals mix randomly, R0 is calculated


Equation 1

where is the rate at which two specific individuals come into effective contact per unit
time, N is the total population size, and D is the duration of infectiousness.
However, as we saw in MD06 , if we assume that individuals do not mix randomly,
needs to be stratified according to the subgroups in the population. For example, the rate
at which an infectious child comes into effective contact with an adult may differ from the
rate at which an infectious child comes into effective contact with another child.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.2: Writing the Next Generation Matrix


page 22 of 97

prev

next

Extending the logic of Equation 1 , and considering a population in which individuals are
stratified into the young or old, we can write down the number of young infectious
individuals resulting from the introduction of one infectious person into a totally susceptible
population as follows:
Ryy = yy Ny D

Equation 7

where yy is the rate at which two specific young individuals come into effective contact per
unit time, Ny is the number of young individuals in the population and D is the duration of
infectiousness.
Similarly, the number of infectious old individuals resulting from the introduction of one
infectious young person into a totally susceptible population is given by:
Roy = oy No D

Equation 8

where oy is the rate at which a specific young infectious person comes into effective
contact with a specific old susceptible individual, and No is the total number of old
individuals in the population.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.3: Writing the Next Generation Matrix


page 23 of 97

prev

next

The expressions for the number of young secondary infectious individuals resulting from
each old infectious person and the number of old secondary infectious individuals resulting
from each old infectious person (Ryo and Roo respectively) are analogous:
Ryo = yo Ny D

Equation 9

Roo = oo No D

Equation 10

and

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.4: Writing the Next Generation Matrix


page 24 of 97

prev

next

As we saw on page 16 , the Next Generation Matrix is defined as the matrix that
summarises the number of secondary infectious individuals in a given category resulting
from infectious individuals in each of the categories. We can now write down our Next
Generation Matrix for our population comprising young and old individuals as follows:

The following diagram summarises the notation used for the subscripts:

Notice that the first subscript of Ryo (i.e. "y") reflects the category of the recipient of the
infection and matches both the first subscript of the parameter and that of the size of the
population subgroup on the right-hand side of the equation.
The second subscript (i.e."o") reflects the category of the source of infection and matches
the second subscript of the parameter on the right-hand side of this equation.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.5: Writing the Next Generation Matrix: Exercise


page 25 of 97

prev

next

During the last session we calculated the following WAIFW matrix describing effective
contact between the young and old in a region in England with 500,000 individuals, using
data on rubella, where the parameters are in units of per day:

In this population,

and the

duration of infectiousness was 11 days.

Optional reading - explanation of the equations for N y and No

Q1.2 Write down the Next Generation Matrix corresponding to the above WAIFW matrix.
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.6: Writing the Next Generation Matrix


page 26 of 97

prev

next

In general terms, if we have a population in which individuals are stratified into multiple
groups, the number of secondary infectious individuals in group i produced by an infectious
person in group j in a totally susceptible population is denoted as Rij . Extending the logic
on page 24 , it can be calculated using the following equation:
Rij = ij Ni D
where ij is the rate at which an infectious individual from group j comes into effective
contact with a specific susceptible individual from group i per unit time, and Ni is the total
number of individuals of group i.
The Next Generation Matrix simply contains all possible values for Rij as its entries. In this
matrix Rij is the value in the i th row and the j th column.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 9: Exercise: Writing down the Next Generation Matrix


for a population comprising 3 groups
page 27 of 97

prev

next

Q1.3 Suppose we have a population in which individuals are stratified into the young,
middle-aged and old (denoted by the letters y, m, o) and that there are Ny, Nm , No
individuals in these groups.
a) Write down the equivalent of the matrix provided on page 16

for this population.

Answer

b) Write down the expressions for Ryy, Rym and Ryo, in terms of Ny, yy, ym , yo and
D.
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

9.1: Exercise: Writing down the Next Generation Matrix for a


population comprising 3 groups
page 28 of 97

prev

next

Q1.3 ctd
c) Write down the expressions for Rmy , Rmm, and Rmo in terms of Nm , my , mm, mo
and D.
Answer

d) Write down the expressions for Roy, Rom, and Roo in terms of No, oy, om, oo and
D.
Answer

Click here to see the Next Generation Matrix.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 10: Calculating R0


page 29 of 97

prev

next

The number of secondary infectious individuals resulting from the introduction of a "typical"
infectious person into a totally susceptible population will be some average of each of the
numbers of the Next Generation Matrix.
As demonstrated by an example in section 7.5.2 of the recommended course text 5 ,
taking the average of the number of infectious individuals resulting from each young and
old person does not lead to the basic reproduction number. Instead, alternative methods
need to be used.
The theory to calculate the basic reproduction number was developed by Heesterbeek et
al during the 1990s (see Diekmann et al (1990) 3 ), and we will explore its applications in
the next pages. Unfortunately the mathematical proof is beyond the scope of this course.
Before presenting the method for calculating the basic reproduction number, we first show
how R0 can be calculated from some simple Next Generation Matrices.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

10.1: Calculating R0 from the Next Generation Matrix exercise


page 30 of 97

prev

next

EXAMPLE 1
Consider the following example of a Next Generation Matrix for a given population in which
individuals are either young or old, denoted by the letters y and o respectively:

Q1.4a
i. How many infectious young individuals does each infectious young person lead to?
ii. How many infectious old individuals does each infectious young person lead to?
Answer

Q1.4b
i. How many infectious young individuals does each infectious old person lead to?
ii. How many infectious old individuals does each old infectious person lead to?
Answer

Q1.4c Given your answers to parts a and b, which of the values listed below is the R0?
Hint: think about the total number of secondary infectious individuals generated by either a
young or old person.

R0 = 1

R0 = 2

R0 = 3

R0 = 6

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

10.2: Calculating R0 from the Next Generation Matrix Example


page 31 of 97

prev

next

EXAMPLE 2
Consider the following Next Generation Matrix:

Q1.5a
i. How many secondary infectious individuals in total does each young infectious
person lead to?
ii. How many secondary infectious individuals in total does each old infectious person
lead to?
Answer

Q1.5b Which of the following is the basic reproduction number for this Next Generation
Matrix?

R0 = 1

R0 = 2

R0 = 3

R0 = 4

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

10.3: Calculating R0 for more complicated Next Generation


Matrices
page 32 of 97

prev

next

Calculating R0 for the previous examples was relatively straightforward because each
infectious young and old person led to the same total number of infectious individuals.
However, in practice, this is rarely the case.

Consider the following example:

The diagram on the right provides a visual


representation of this Next Generation Matrix. This
highlights the following:
One infectious child
will lead to 1
secondary infectious child and 1 secondary
infectious adult.
One infectious adult
will lead to 1
secondary infectious child and 4 secondary
infectious adults.
We will think about how we can calculate R0 on the next few pages.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

10.4: Calculating R0 for more complicated Next Generation


Matrices
page 33 of 97

prev

next

To calculate R0, we need to define a "typical" infectious person, who is some suitable
average of the subgroups.
For the matrices considered in the last few pages, this means that the "typical" infectious
person will be partly young and partly old. In mathematical terms, if a fraction x of this
typical infectious person is young, then by definition, a fraction (1-x) must be old. We can
represent this infectious individual using the following vector notation:

See page 6 of the maths refresher to review the definition of vectors and their
relationship to matrices.You may prefer to do this at a later stage, after you have had the
chance to read through the next few pages.
You will see how we can find the values for x and R0 on the next page.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 11: Defining the typical infectious person and finding


R0
page 34 of 97

prev

next

According to mathematical theory (the proof of which is beyond the scope of this course,
see Diekmann 1990 3 ), if we simulate the introduction of an infectious person into a totally
susceptible population in which there is an unlimited supply of susceptible individuals and
in which individuals contact each other according to some Next Generation Matrix, then
two things happen:
1. The number of secondary infectious individuals resulting from each infectious person
in each generation converges to R0; and
2. The distribution of the infectious individuals in each generation converges to some
distribution, which reflects that of the "typical" infectious person.
Therefore if we divide the number of infectious individuals in one generation by that in the
previous generation, we will get R0. Likewise, if we calculate the proportion of the
individuals in each generation who belong to each of the subgroups, we can obtain the
proportion of the typical infectious person which belongs to these subgroups and obtain x.
In this module, we shall refer to this method for calculating R0 as the simulation
approach.The application of this theory is fairly straightforward, as we shall show on the
next few pages.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.1: Defining the typical infectious person and finding R0


page 35 of 97

prev

next

On the next few pages, we will show that the simulation process described on the previous
page is equivalent to repeatedly multiplying some vector representing an initial infectious
person introduced into a totally susceptible population by the Next Generation Matrix.
We will illustrate how we can do this in Excel for the Next Generation Matrix that we
introduced on page 32 :

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.2: Exercise - Finding R0 and x


page 36 of 97

1. Open the Excel file NGM_demo.xlsx

prev

next

You should see something resembling the the image below:


a) Pink and blue cells containing the Next Generation Matrix (cells B4:C5). These
cells have been assigned the names R_yy, R_yo, R_oy and R_oo.
b) Cells F4 and F5 contain the number of infectious young and old individuals
respectively at the start.
c) Cell F7 contains the total number of infectious individuals at the start.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.3: Exercise - Finding R0 and x


page 37 of 97

prev

next

Q1.6 Using pen and paper, calculate the following:


a) The number of secondary infectious young and old individuals that you would
expect to see in the first generation.
b) The total number of infectious individuals that you would expect to see in the first
generation.
c) The ratio between the number of infectious individuals in the first generation and
that at the start.
Click here

if you would like to revise how matrices can be multiplied to vectors.

Answer a

Answer b

Answer c

2. If you wish, use pen and paper to calculate the numbers mentioned in Q1.6 for the
second generation. Alternatively, return to the spreadsheet, select columns F and
AA together, click with the right mouse button and select the unhide option.
Similarly, select rows 8 and 10 together, click with the right mouse button and select
the unhide option.
You should now see how the number of infectious individuals changes with each
generation. You should also see how the ratio between the number of infectious
individuals in a given generation and that in the preceding generation converges to some
value (4.3). This value equals R0.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.4: Exercise - Finding R0 and x


page 38 of 97

prev

next

We will now explore how the proportion of infectious individuals who are young and old
changes in each generation.
3. Select rows 10 and 13 together, click with the right mouse button and select the
"Unhide" option.
4. You should now see cells showing the proportions of the infectious individuals in
each generation who are young (pink) and old (blue). You should notice that these
proportions converge to the values 0.232408 (young) and 0.767592 (old). These
values reflect the proportions of the typical infectious person that is young and old.
5. Change the number of infectious individuals introduced into the population at the
start (in cells F4 and F5) to be the following, and look at the value for R0 in each
case.
a) 1 young person and 1 old person.
b) 50 young people and 20 old people.
c) Any value for each category that you choose.
Q1.7 How does changing the number of infectious individuals introduced at the start
change your estimate of R0 (see cell Z9)?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.5: Exercise - Finding R0 and x


page 39 of 97

prev

We will now see whether this method for calculating R0 works for another matrix.
6. Change the Next Generation Matrix in cells B4:C5 in the spreadsheet to be as
follows and identify the value for R0.

Answer

next

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.6: Defining the typical infectious person and finding R0


page 40 of 97

prev

next

As shown in the previous exercise, if we simulate the introduction of an infectious person


into a totally susceptible population in which different subgroups contact each other
according to some Next Generation Matrix, then the ratio between the number of infectious
individuals in successive generations, and the proportions of individuals in each generation
that belong to different subgroups converge to some values. As shown by Heesterbeek et
al 3-4 , these numbers represent the values for R0 and the proportion of the typical
infectious person that belongs to each of the subgroups respectively.
For example, Figure 7 plots
the estimates for the fraction
of the infectious person in
each generation that is
young (=x) or old (=1-x) in
each generation, which we
obtain through the
simulation process
described above if we use
the following Next
Generation Matrix:

Figure 7. Proportion of individuals in each generation that are young or


old, obtained by simulating the introduction of infectious individuals into a
totally susceptible population, with unlimited numbers of susceptible
individuals, in which individuals contact each other according to matrix
.

The graph shows that after


several (in this case 4)
generations the distribution
of young and old infectious
individuals in each
generation converges to a
value that gives the
distribution of the "typical
infectious person".
For this Next Generation
Matrix, the typical infectious
person is 23% young and
77% old.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.7: Defining the typical infectious person and finding R0


page 41 of 97

prev

next

The same applies when we plot the ratio between the numbers of infectious individuals in
a given generation and that in the previous generation.
We can see this in Figure 8, which shows that after several generations have occurred,
the ratio between the numbers of infectious individuals in successive generations
converges to some value, which equals R0. In this case R0 4.3.

Figure 8.Ratio between the number of infectious individuals in successive generations, obtained by simulating
the introduction of infectious individuals into a totally susceptible population, with unlimited numbers of
susceptible individuals, in which individuals contact each other according to matrix

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 12: Other methods for calculating R0


page 42 of 97

prev

next

There are alternative ways to calculate R0. We discuss two of them here.
Simultaneous equations approach
It can be shown that the simulation approach that we introduced on page 34 for
calculating R0 and the proportion of the typical infectious person that is young is equivalent
to finding the values for R0 and x which satisfy the following two equations simultaneously:
Ryyx + Ryo (1-x) = R0x

Equation 16

Roy x + Roo (1-x) = R0 (1-x)

Equation 17

For the purposes of this study module, you do not need to be able to derive these
equations. However, if you would like to find out how we can obtain them, a simplified
derivation of these equations, based on the work of Diekmann et al 3-4 is provided in the
Appendix A.5.1 of the recommended course text 5 .
Equation 16 and Equation 17 can also be written in matrix form as follows:
Ryy

Ryo

Roy Roo

x
1x

x
= Ro

1-x

Equation 18

You can look at page 6 of the maths refresher or page 16 of MD06 if you would like
to revise how simultaneous equations can be written using matrix notation.
On the next few pages, we will use the equations to find the R0 and x for the following
Next Generation Matrix that we saw on page 32 :

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.1: Other methods for calculating R0: Illustration of the


simultaneous equation approach
page 43 of 97

prev

We begin by substituting the matrix

into Equation 18

next

to obtain the

following:
1 1
1 4

1-x

= Ro

x
1x

Equation 19

After applying the rules for multiplying a matrix to a vector (see page 6 of the maths
refresher , we see that the left-hand side of this equation simplifies to the following:

Using this simplification, we see that Equation 19 can be written equivalently as

or, using simultaneous equations, as:


1 = R0 x

Equation 20

4 - 3x = R0 (1-x)

Equation 21

After some rearranging (click on the button below for the explanation), these equations can
be solved to give the following two sets of possible values for x and R0, respectively.
R0 4.3 and x 0.23
or
R0 0.69 and x 1.23
Since it is not possible for the fraction of the typical infectious person that is young to be
bigger than 1, we are led to accept the value for R0 and x of 4.3 and 0.23, respectively.
These values are consistent with those estimated using the simulation approach seen
previously (see pages 40 and 41 ).
Explanation

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.2: Optional - other methods for calculating R0


page 44 of 97

prev

next

As illustrated by the example on page 43, there may be more than one value for "R0"
which satisfies Equation 18 . According to mathematical theory (which is beyond the
scope of this course), R0 is then taken to be the largest value which satisfies that equation.
A hand-waving explanation for why R0 is taken as the largest value which satisfies
Equation 18 is that, if we substitute it into the equation for the herd immunity threshold (11/R0), it leads to the higher value for the proportion of the population which needs to be
immune to control transmission. If coverage of the intervention were to be introduced at
this level in the overall population, it is likely to be sufficiently high to control transmission
even in the highest risk group.
The mathematical name for the largest value satisfying Equation 18 is the "dominant
eigenvalue of the Next Generation Matrix".
If you are interested in reading more about this, see Diekmann and Heesterbeck 3 , and
the recommended course text 5 , pages 212-215 for further details.
We will now consider another approach for calculating R0. We will refer to this method as
the Matrix determinant approach

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.3: Optional - other methods for calculating R0


page 45 of 97

prev

next

Matrix determinant approach


If we have a population comprising 2 subgroups (denoted using the subscripts y and o
respectively), then it can be shown that finding the value for R0 which satisfies Equation
18 is equivalent to finding the value of which satisfies the following equation:
(Ryy - )(Roo - ) - RyoRoy = 0

Equation 24

As R0 is given by the largest value which satisfies Equation 18, R0 must also be the largest
value of which satisfies Equation 24.
For the purposes of this study module, you are not expected to be able to derive Equation
24. However, if you are interested, further details of how Equation 24 can be derived from
Equation 18 and why this approach can be referred to as the "matrix determinant
approach" are provided in the recommended course text 5 on pages 212-215 and
Appendix A.5.1.2.
We will illustrate how we can apply Equation 24 on the next page.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.4: Optional - other methods for calculating R0


page 46 of 97

prev

We return to the matrix that we considered on page 32

, namely

next

In this matrix Ryy = 1, Ryo = 1, Roy = 1 and Roo = 4.


Substituting for these values into Equation 24

, we obtain the following equation:

(1 - )(4 - ) - 1*1 = 0
This equation can be rearranged to give the following:
2 - 5 + 3 = 0
This equation is analogous to Equation 22 which is discussed in the derivation of the value
for R0 using the simultaneous equations approach (click on the "Explanation button" on
page 43 ). The remainder of the derivation presented on that page, together with the fact
that R0 is the largest value of which satisfies Equation 24 leads to the result that R0
4.3.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 13: Calculating the net reproduction number


page 47 of 97

prev

next

The methods that we have described so far in this session to calculate Ro can be applied
to calculate the net reproduction number (Rn) for a non-randomly mixing population, in
which some individuals may already be immune, as a result of vaccination or previous
infection. In this instance, the Next Generation Matrix is written down using the number of
susceptible (rather than all) individuals in each group. For example, considering a
population in which individuals are stratified into the young and old, Ryy, Ryo, Roy, and Roo
would be given by the following equations (see also the diagram below):
Ryy = yyS yD
Ryo = yoS yD
Roy = oyS oD
Roo = oo S oD
where S y and S o are the
number of susceptible young
and old individuals.
Rn is then calculated using
the resulting Next
Generation Matrix in the
same way we calculated R0
above. We will illustrate this
in further detail in the
practical part of this session.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

13.1: Extending the method to deal with more than two


subgroups
page 48 of 97

prev

next

The methods that we have described to calculate R0 can also be extended relatively easily
to deal with populations consisting of more than two subgroups.
For example, if the population comprised 3 subgroups, a fraction x, w and 1-x-w of the
typical infectious person would belong to the first, second and third subgroups. For a Next
Generation Matrix such as the following, in which the population is stratified into the young,
middle-aged and the old (denoted by the letters y, m and o respectively):

we could calculate R0 by simulating the introduction of an infectious person into a totally


susceptible population in which there is an unlimited supply of susceptible individuals and
in which individuals contact each other according to this Next Generation Matrix.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

13.2: Extending the method to deal with more than two


subgroups
page 49 of 97

prev

next

As in the case when the population is stratified into two age groups , R0 then equals the
ratio between the number of infectious Individuals in a given generation and that in the
previous generation after the ratio had converged. x, w and (1-x-w) can then be calculated
as the proportion of each generation which are in the first, second and third subgroups
respectively.
Adapting the simultaneous equations approach described for two age groups to deal
with three age groups, we see that R0 can also be calculated by solving the following
matrix equation:

or, for the matrix described on the previous page, as follows:

This equation could be written equivalently using the following simultaneous equations:
x+5w+4(1-x-w) = R0x
2x+3w+6(1-x-w) = R0w
3x+7w+8(1-x-w) = R0(1-x-w)

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 14: Practical application of the Next Generation


Matrix to calculate Rn for measles in England and Wales
page 50 of 97

prev

next

The methods described above have been and are still used to estimate the net
reproduction number for various diseases. In particular, during the mid-1990s these
techniques were used by the then Public Health Laboratory Service to assess the potential
for a measles epidemic to occur in England and the need for further measles vaccination.
The work was carried out by Gay and colleagues, and has since been published 6-7 .
We discuss this application on the next few pages.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.1: Practical applications: calculating Rn for measles in


England and Wales - background
page 51 of 97

prev

next

Measles vaccine was introduced in England in 1968, but its uptake was variable (see
Figure 9, dotted line). The introduction of vaccination resulted in a decline in the notification
rates for measles (see Figure 9, bars), and by the early 1990s they had reached a very
low level.
During the first half of 1994, slight increases were seen in the notification rates (see Figure
9, red circle); a large outbreak had occurred in Scotland during the period 1993-4 and
there were concerns that a large epidemic, with more than 100,000 cases, was imminent.
Work was carried out by Gay et al to estimate the net (or effective) reproduction number
(Rn) in England and Wales and whether it was likely that an epidemic would occur6 .

Figure 9. Measles notifications and deaths in England and Wales. Extracted from Gay et al 6 , .

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.2: Practical applications: calculating Rn for measles in


England and Wales the model
page 52 of 97

prev

next

Figure 10 shows examples of the WAIFW matrices calculated using values for the force of
measles infection estimated from data from England and Wales from before the
introduction of measles vaccination 6 . The force of infection among those aged over 10
years was not reliably known, due to the high prevalence of immunity in this age
group.This meant that the parameters for a given structure for the WAIFW matrix could
not be reliably estimated.For a given WAIFW structure, Gay et al therefore used several
different assumptions about the amount of contact between individuals in this age group
and those in other age groups.

Figure 10. Examples of WAIFW matrices describing contact between different age groups in England and Wales
obtained by Gay et al, using estimates of the force of infection for measles, calculated using data collected
before the introduction of vaccination 6 . reflects the factor by which the rate at which 10-14 year olds come
into contact with each other differs from that between individuals aged 5-9 years. Extracted from Gay et al 6 .

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.3: Practical applications: calculating Rn for measles in


England and Wales the model
page 53 of 97

prev

next

Gay et al then combined these estimates with estimates of the proportion of individuals in
different age groups who were susceptible to measles infection (see Figure 11) in 1994.

Figure 11.Estimates of the percentage of different birth cohorts alive in England and Wales who were
susceptible to measles in 19946 , calculated using haemagglutination inhibition (HI) data for those born before
1984 and different assumptions about the proportion susceptible for those born after 1985/6 (labelled Scenario
A" and "Scenario B). See Gay et al 6 for further details of these assumptions.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.4: Practical applications: estimates of Rn for measles in


England and Wales
page 54 of 97

prev

next

The figure below shows the estimates for the net reproduction number (Rn) obtained by
Gay et al using different assumptions about contact between 10-14 year olds. These
results highlighted that the net reproduction number in 1994 in England and Wales was
very close to 1 (the horizontal dashed line) and that there was potential for an epidemic to
occur.
Further calculations carried out by Gay et al suggested that if an outbreak occurred, it
could involve more than 100,000 cases. These conclusions were supported by other
studies using dynamic models 6 .
As a result of these analyses, a measles-rubella vaccination campaign was carried out in
November 1994 in England and Wales, targeting 95% of the 7 million 5-16 yr olds. No
measles epidemic was recorded during the subsequent few years.
This was perhaps the first time that modelling was used to guide vaccination policy in the
UK. Since then, the potential for a measles epidemic to occur in England and Wales
continues to be evaluated in the same way7 .
If you have time, try Exercise 7.4 and the exercises associated with model 7.5 of the online
exercises associated with the course text 5 , where you can try doing these calculations
yourself.

Figure 12. Estimates for Rn during the 1990s in England and Wales obtained using different assumptions about

contact between individuals aged 10-14 years.See page 52

and Gay et al 6

for further details.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 15: Break


page 55 of 97

prev

next

We have now completed part 1 of this session, in which we covered the theory for how we
can calculate R0 to account for non-random mixing between individuals.
The rest of this session consists of a practical exercise, during which you will be able to
apply the theory, using Excel and Berkeley Madonna. This exercise is likely to take 1-3
hours

. You may like to take a break before continuing.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 16: Practical: calculating the basic reproduction


number for a non-randomly mixing population
page 56 of 97

prev

next

OVERVIEW
We will now start parts 2 and 3 of this session during which you will apply the theory
discussed in the first part to calculate the Next Generation Matrix and R0 for a given set of
assumptions about contact between individuals.
OBJECTIVES
By the end of the practical part of this session you should:
Be able to write down the "Next Generation Matrix" for given assumptions about
contact between individuals.
Understand the relationship between the basic reproduction number and the Next
Generation Matrix.
Be able to calculate R0 by using the simulation approach, i.e. simulating transmission
following the introduction of one infectious person into a totally susceptible
population mixing according to given contact patterns.
Be able to calculate the net reproduction number from the Next Generation Matrix.
Be able to calculate R0 using the simultaneous equations approach in Excel.
Part 2 of this session provides further practice in writing down the Next Generation Matrix
and using it to calculate R0. Part 3 of this session illustrates how R0 can be calculated
using the simultaneous equations and matrix determinant approaches.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.1: Part 2 (Practical): Introduction


page 57 of 97

prev

next

In this exercise, we will revisit the population that we worked with in the practical
component of MD06 , in which individuals were stratified into the young, middle-aged
and old, and illustrate how we can calculate R0 associated with matrices WAIFW A and
WAIFW B.
Click here

to remind yourselves of these matrices.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.2: Part 2 (Practical): Calculating the Next Generation


Matrix
page 58 of 97

prev

next

We first focus on how we can calculate the Next Generation Matrix associated with
WAIFW B.
Calculating the Next Generation Matrix for populations mixing according
to WAIFW B
1. Open up the Excel file R0waifb.xls . The layout of the spreadsheet should
resemble what you see in the image below:

The blue cells (rows 2-20) contain the parameters required to calculate the basic
reproduction number, namely:
a) The average duration of infectiousness (ave_infous ).

b) The total number of individuals in the young, middle-aged and old categories
(N_y , N_m and N_o respectively).
c) The proportion immune (prop_imm , currently set to be 0).
d) The number of young, middle-aged and old susceptible individuals (S_y, S_m
and S_o respectively).
e) The daily rate at which specific infectious and susceptible individuals in different
age categories come into effective contact, namely
b_yy, b_ym, b_yo,
b_my, b_mm, b_mo,
b_oy, b_om, b_oo,
located in cells F17:H19 .
NOTE: You can see the name of a given cell by clicking on that cell and looking in the
box in the top left hand corner of your sheet, just below the menu bar.
The orange cells in cells F25:H27 will contain the entries for the Next Generation Matrix,
and have been assigned the names R_yy, R_ym, R_yo, R_my, R_mm, R_mo, R_oy,
R_om and R_oo.
We will set up expressions in these cells later.Please do not do so just yet!

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.3: Part 2 (Practical): Calculating the Next Generation


Matrix
page 59 of 97

prev

next

Q2.1 Looking at the orange cells in the spreadsheet (cells F25:H27), how many secondary
infectious individuals among young individuals will occur as a result of the introduction of:
i) 1 infectious young person
ii) 1 infectious middle-aged person and
iii) 1 infectious old person?
Answer

You may have noticed that the equations in cells F25, G25 and H25 have been set up
using the number of susceptible young, middle-aged and old individuals, rather than in
terms of the total number of individuals in each category. We could have set up these
equations to be in terms of the total numbers of individuals in each category, i.e. N_y, N_m
and N_o. However, later in this practical, we will vary the proportion of the population that
is immune in the population and use these cells to calculate the net reproduction number.
For this reason, the numbers in these cells have been expressed in terms of the number of
susceptible individuals in each category.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.4: Part 2 (Practical): Calculating the Next Generation


Matrix
page 60 of 97

prev

next

2. Using pen and paper, write down the appropriate expressions for the number of
secondary infectious individuals which would occur among middle-aged susceptible
individuals as a result of the introduction of:
i) 1 young infectious person,
ii) 1 middle-aged infectious person, and
iii) 1 old infectious person.
Hint

Answer

3. Now set up the appropriate expressions in cells F26, G26 and H26 of the
spreadsheet.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.5: Part 2 (Practical): Calculating the Next Generation


Matrix
page 61 of 97

prev

next

4. Select the appropriate terms (from the drop-down menus below) to complete the
equations for the number of secondary infectious individuals which would occur
among old susceptible individuals as a result of the introduction of:
i) 1 young infectious person =

ii) 1 middle-aged infectious person


=
iii) 1 old infectious person =

Answer

5. Now set up the appropriate equations in cells F27, G27 and H27 of the spreadsheet.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

16.6: Part 2 (Practical): Calculating the Next Generation


Matrix
page 62 of 97

prev

next

Q2.2 How many secondary infectious individuals does each young, middle-aged and old
infectious person generate in a totally susceptible population? Select the correct option for
each age group from the drop down menus.
a) Each young infectious person generates
totally susceptible population.
b) Each middle-aged infectious person generates
individuals in a totally susceptible population.
c) Each old infectious person generates
totally susceptible population.

infectious individuals in a

infectious

infectious individuals in a

Answer

If you find that your answers differ from those provided, click here
R0waifwb_solna.xlsx, where you can check your expressions.

to open up

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 17: Part 2 (Practical): Calculating R0 using the


simulation approach
page 63 of 97

prev

next

Our Next Generation Matrix is now as follows:

We will now calculate the basic reproduction number corresponding to this Next
Generation Matrix using the simulation approach that we introduced on page 34

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

17.1: Part 2 (Practical): Calculating R0 using the simulation


approach
page 64 of 97

prev

next

6. Select rows 43 and 58 together, click with the right mouse button and choose the
"Unhide" option.
You should now see some pink cells containing statistics relating to the number of
infectious individuals which result over time as a result of the introduction of one infectious
person into a totally susceptible population. At present, this person has been specified to
be young.
Q2.3 According to cell B48, how many young infectious individuals will occur in the first
generation as a result of the introduction of this infectious individual?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

17.2: Part 2 (Practical): Calculating R0 using the simulation


approach
page 65 of 97

prev

7. Set up an appropriate expression for the number of middle-aged infectious


individuals (in cell C48), which will occur in the first generation as a result of the
introduction of the initial infectious person.
Hint

Answer

next

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

17.3: Part 2 (Practical): Calculating R0 using the simulation


approach
page 66 of 97

prev

next

8. Similarly, set up appropriate expressions for:


i) the number of old infectious individuals (in cell D48), and
ii) the total number of infectious individuals (in cell E48)
which will occur in the first generation as a result of the introduction of the initial
infectious person.
Answer

If your answer differs from the one provided above, refer to R0waifb_solnb.xlsx
holds the expressions that you should have set up by now.

which

NOTE: There is an alternative method for setting up these equations in Excel, which is
explained on the next page.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 18: Part 2 (Practical): Calculating R0 using the


simulation approach
page 67 of 97

prev

next

Alternative expressions for the number of infectious individuals in a


given age category
As an alternative, you could have also typed the following into the cell for the number of
young infectious individuals in the first generation:
=SUMPRODUCT($F$25:$H$25,B47:D47)
This calculates the sum of the cross-product of the cells in the range F25:H25 and
B47:D47 i.e.
F25*B47 + G25*C47 + H25* D47
The dollar signs have been inserted for the cell range F25:H25 so that, when this formula
is copied down to the next row, it still refers to the same cells F25:H25.
The corresponding formulae for the number of middle-aged and old infectious individuals
in the first generation would be:
=SUMPRODUCT($F$26:$H$26,B47:D47) (middle-aged infectious
individuals)
=SUMPRODUCT($F$27:$H$27,B47:D47) (old infectious individuals)

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.1: Practical: Part 2 (Practical): Calculating R0 using the


simulation approach
page 68 of 97

prev

next

Q2.4 According to cells G48-I48, what proportion of infectious individuals in the first
generation are young, middle-aged and old?
Answer

Click the button below to see what you should see at this point.
Show

Q2.5 According to cell K48, how many secondary infectious individuals resulted directly
from the initial infectious person introduced into the population?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.2: Practical: Part 2 (Practical): Calculating R0 using the


simulation approach
page 69 of 97

prev

We will now explore


what happens in the
second and
subsequent
generations.
9. Copy all the
expressions for
the first
generation
down until the
10th
generation.
10. Now select
columns N and
Y together,
click with the
right mouse
button and
select the
unhide option.
You should
now see two
figures
resembling
those shown
on the right.
The top graph
shows the age
distribution of the
infectious individuals
in each generation.

next

The bottom graph


shows the average
number of secondary
infectious individuals
resulting from each
infectious person.
If the graphs that you
see at this stage
differ from those
shown here, click
here to open up
R0waifwb_solnc.xlsx,
where you can check
your expressions.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.3: Practical: Part 2 (Practical): Calculating R0 using the


simulation approach
page 70 of 97

prev

next

Q2.6 What happens to the age distribution of the new infectious individuals in each
generation after a few generations have occurred?
Answer

Q2.7 What is the average number of secondary infectious individuals resulting from each
infectious person after a few generations have occurred?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 19: Part 2 (Practical): Effective vaccination coverage


required to control transmission
page 71 of 97

prev

next

11. Calculate the level of effective vaccination coverage that would be required to control
transmission in a population which mixed according to WAIFW B, assuming that the
basic reproduction number was equal to the value obtained in the previous question.
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

19.1: Part 2 (Practical): Testing the estimated value for R0


using the Berkeley Madonna model
page 72 of 97

prev

next

We will now return to the model that we worked with in MD06, which described the
transmission of rubella in a population in which individuals were stratified into the young,
middle-aged and old. We will test to see if the value for R0 that we estimated for WAIFW B
is correct by exploring what happens when we incorporate vaccination at levels of
coverage which are similar to those calculated in the previous step.
12. Start up Berkeley Madonna and open the Berkeley Madonna file waifwb_ R0 flowchart.mmd or waifwb_R0 - equations.mmd . The model in this file is
identical to the one which you used in in MD06, except for the fact all the
parameters for WAIFW B have already been set up. Click here if you would like to
remind yourself of the key features of this model. Run the model and click on Page 3
of the Figures window to see the daily number of new infections per 100,000
population for the three age groups.
Vaccination of newborns is currently introduced on day 36500 (or year 100) in the model.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

19.2: Part 2 (Practical): Testing the estimated value for R0


using the Berkeley Madonna model
page 73 of 97

prev

next

Q2.8 How do you think predictions of the daily number of new infections per 100,000
among young, middle-aged and old individuals will change if you introduce vaccination of
newborns at the following levels of effective coverage:
i) 72%
ii) 72.2%
iii) 72.3%
iv) 72.4%
v) 72.5%
Answer

13. Check your hypothesis by running the model for the levels of effective coverage
specified in the previous question. Remember that you can modify the vaccine
coverage by moving the slider to the desired level, or by typing in the value in the
parameters window.
You can check that you are getting the correct figures by clicking on the tab which is
labelled with the vaccination coverage that you are interested in. If your model has crashed
or you are not getting these results, open up the file waifwb_ R0 - flowchart.mmd or
waifwb_R0 - equations.mmd again and ensure that you are entering the vaccination
coverage as a proportion and not as a percentage.
72% vaccination
coverage

72.2% vaccination
coverage

72.5%
vaccination coverage

72.3% vaccination
coverage

72.4% vaccination
coverage


According to these graphs, transmission appears to stop if the level of effective vaccination
coverage is 72.3%, which is below the herd immunity threshold that we calculated in step
11 . However, this conclusion is incorrect. If we click on the table button , we see that
a tiny number of new infections are still occurring even on day 300,000.
As we shall show on the next page, we can see this in detail if we change the figure so
that the number of new infections per 100,000 is plotted on a log scale.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

19.3: Part 2 (Practical): Testing the estimated value for R0


using the Berkeley Madonna model
page 74 of 97

prev

next

14. Copy the figure on Page 3 to a new figure by clicking on the


button and change
the scale on the y-axis to go from a minimum of 10-40 to a maximum of 20, and to be
logarithmic. See page 5 of the guide to Berkeley Madonna if you would like to
remind yourself of how to change the scale of the y-axis.
Click the button below to see the figure that you should see by this stage for levels of
effective coverage of 72.3%, 72.4% and 72.5%.
Show

If your output fails to match these figures, check your settings against those in the file
WAIFWB_R0 - flowchart_solna.mmd or WAIFWB_R0 - equations_solna.mmd .

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

19.4: Part 2 (Practical): Testing the estimated value for R0


using the Berkeley Madonna model
page 75 of 97

prev

Q2.9 What can we conclude about the herd immunity threshold from our Berkeley
Madonna model?
Answer

next

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 20: Part 2 (Practical): Effect of the initial numbers of


infectious individuals on estimates of R0
page 76 of 97

prev

next

15. Return to the spreadsheet that you were working with. If you have already closed the
spreadsheet, click here to open up the spreadsheet that you should have
developed by now. Change the numbers of infectious individuals introduced into the
population at the start to take the following values and look at the figures showing
the age distribution of infectious individuals in each generation, and the ratio
between the numbers of infectious individuals in successive generations:
i) 20, 50, 30 young, middle-aged and old infectious individuals respectively.
ii) 30, 20 and 2 young middle-aged and old infectious individuals respectively.
iii) 0.5, 0.2 and 0.3 young, middle-aged and old infectious individuals
respectively.
Q2.10 How does changing the values for the numbers of infectious individuals introduced
into the population at the start affect the age distribution of infectious individuals and the
ratio between the number of infectious individuals in successive generations, after a few
generations have occurred?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

20.1: Part 2 (Practical): Net reproduction number


page 77 of 97

prev

next

The methods applied in this session can also be used to calculate the net reproduction
number if, for example, a proportion of the population is immunised.
16. Still working with your spreadsheet, change the value for prop_imm (cell F8) to the
values listed below to see what happens to the average number of secondary
infectious individuals resulting from each infectious person after a few generations
have occurred if the following proportions of the population are immune:
i) 25%
ii) 50%
iii) 72.5%
iv) 75%
Expected results

Before continuing, you may like to save your Excel file.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 21: Part 2 (Practical): Additional exercises


page 78 of 97

prev

next

We have now completed part 2 of this session.


Before continuing to part 3 of the session, you may like to repeat your calculations using
the transmission parameters relating to WAIFW A . You should find that the basic
reproduction number corresponding to this matrix is about 10.9.When doing this, you will
need to ensure that infectious individuals are introduced into each of the young, middleaged and old age groups at the start, as otherwise, the answer that you get may be
misleading.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.1: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 79 of 97

prev

next

As mentioned on page 49 , if we have a population in which individuals are stratified into


three groups, e.g. the young, middle-aged and old, the basic reproduction number can be
found by identifying the values x, w and R0 for which the following matrix equation holds:

Equation A

This equation can be written out in full as follows:


Ryyx+Rym w+Ryoz = R0x

Equation B

Rmy x+Rmmw+Rmoz = R0w

Equation C

Royx+Romw+Roo z = R0z

Equation D

where z = 1 - x - w.
Equation B is equivalent to saying that the total number of young infectious individuals
resulting from each infectious person equals R0x.
Equation C is equivalent to saying that the total number of middle-aged infectious
individuals resulting from each infectious person equals R0w.
Equation D is equivalent to saying that the total number of old infectious individuals
resulting from each infectious person equals R0(1-x-w).
The values for x, w and z (=1-x-w) when all three equations B - D hold simultaneously
provide the proportions of the typical infectious person which is young, middle-aged and
old respectively.
We will now illustrate how values for x, w and R0 which satisfy equations B - D can be
obtained using the "Solver" option in Excel.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.2: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 80 of 97

prev

next

1. Return to the spreadsheet that you were working with. If you have already closed the
file, click here to open the file which you should have developed by now. If you
have not yet done so, reset the value for the proportion of the population which is
immune (in cell F8) to zero. Select rows 30 and 43 together, click with the right
mouse button and choose the "Unhide" option.
The layout of this section of the spreadsheet should resemble what you see in the image
below. It contains the following:
a) Yellow cells containing the proportions x, w and z which are currently set to
equal 0.8, 0.15 and 0.05 respectively (see cells F33, F34 and F35). These cells
have been assigned the names x_, y_ and z_ respectively.
b) Lilac cells containing the following:
i) an initial estimate of 4 for R0 (called R0_est), and
ii) cells which will eventually contain expressions for the number of young,
middle-aged and old infectious individuals resulting from each infectious
person using the left and right-hand side of equations B-D .
Q3.1 With the current value for R0_est, x, w and z, how many young infectious individuals
will result from the introduction of an infectious individual?
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.3: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 81 of 97

prev

next

We now need to set up the left and right-hand side of equations C and D in the
appropriate cells in our spreadsheet and find values for x, w, z and R0_est for which the
left-hand sides of Equations C-D equal their right-hand sides.
2. Set up the appropriate expression in cell F40 for the number of middle-aged
individuals resulting from the introduction of an infectious individual into a totally
susceptible population, using the left-hand side of equation C.
Click the button below to check your expressions for cell F40.
Show

3. Set up the appropriate expression in cell F41 for the number of old infectious
individuals resulting from the introduction of an infectious individual into a totally
susceptible population, using the left-hand side of equation D.
Click the button below to check your expression for cell F41.
Show

If your answers differ from the ones provided, click here


where you can check your equations.

to open R0waifwb_solnd.xlsx,

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.4: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 82 of 97

prev

4. Set up the appropriate expression in cell H40 for the number of middle-aged
individuals resulting from the introduction of an infectious individual into a totally
susceptible population, using the right-hand side of equation C.
Click the button below to check your expression for cell H40.
Show

5. Set up the appropriate expression in cell H41 for the number of old infectious
individuals resulting from the introduction of an infectious individual into a totally
susceptible population, using the right-hand side of equation D.
Click the button below to check your expression for cell H41.
Show

If your answers differ from those provided, click here


where you can check your equations.

to open R0waifwb_solne.xlsx,

next

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.5: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 83 of 97

prev

next

We will now try to find the values for x, w, z and R0_est for which the left-hand sides of
equations B-D equal the right-hand side of these equations using Excels Solver option.
You may recall from MD04 that to identify optimal parameter values using the Solver
routine, you need to provide the following:
a) The location of a single cell which contains an expression whose value you want
to maximise, minimise or to be set to some value (specified under the "Set target
cell" option) and
b) The cell(s) which are allowed to change so that this maximum, minimum, etc is
attained (under the "By changing cells" option).
We first consider how we can set up a single cell containing an expression which, when
minimised, contains the values for x, w and R0_est that we need. We shall use an
expression obtained by summing the squares of the difference between the values on the
left and right hand side of the equations.The rationale for this expression is described on
the next page.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.6: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 84 of 97

prev

next

The expressions that we will be using have been hidden and we will first unhide them.
6. Return to your spreadsheet, select the range of cells J36:L42 and change the color
of these cells to be black.
Reminder: to change the colour of cells which you have selected, click on the Home tab,
click on the arrow part of the Fill color button
and choose the black box from the
palette of cell colours available. Click on OK to continue.
The layout of the spreadsheet should resemble what you see in the image below. It
contains the following:
a) Cell K39 contains a formula for the sum squared of the difference between the
number of young infectious individuals predicted using the left hand-side of equation
B and that predicted using the right-hand side of equation B.
b) Cells K40 and K41 have analogous formulae relating to equations C and D;
c) Cell K42 holds the sum of the cells K39, K40 and K41.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.7: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 85 of 97

prev

next

Q3.2 If R0_est were to equal the basic reproduction number and if x, w, and z were to
reflect the proportion of the typical infectious person which is young, middle-aged and old
respectively, what should be the values of the expressions in the following cells:
a) K39, K40, K41?
b) K42 (i.e. the sum of cells K39, K40, and K41)?
Answer

OPTIONAL CHECK
You can test your answer by typing in the values for x, w and R0 which you obtained from
part two of this session into cells F33, F34 and F36. You should not change the
contents of the cell for z (cell F35), since this is expressed in terms of x and w and should
be updated automatically when x and w change.
You will find that the value of the expression in cell K42 will not actually equal zero, given
the accuracy of the calculations.Even if you use values for the proportion of the infectious
individuals in each generation that are calculated after 500 generations have occurred, the
value of the expression is still slightly above zero, i.e. about 10-31 .

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.8: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 86 of 97

prev

next

Q3.3 Conversely, if the value of the expression in cell K42 were to equal zero, what would
you be able to conclude about the values of the expressions in cells K39, K40 and K41?
Answer

Q3.4 Given your answer to the last question, what might we set to be the target cell in
Excels Solver routine if we wanted to use Solver to identify R0, and the proportion of the
typical infectious person which is young, middle-aged and old? Click here if you would
like to remind yourself of the options in Solver.
Answer

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.9: Part 3 (Practical): Calculating R0 using the simultaneous


equations approach
page 87 of 97

prev

next

7. If you have changed the values for R0_est, x, w and z, change them to their original
values (R0_est = 4, x = 0.8, w = 0.15 and z = 1-x-w).
8. Select the Data tab and choose the Solver option. If it is not available click here
for instructions on how to install it.
9. Use your answer to the previous question
and specify that it has to be set to zero.

to set up an appropriate target cell,

10. Set up appropriate cell locations in the "By changing cells" option, noting that z is
expressed in terms of x and w. Note that to enter more than one parameter name or
cell reference in this option, you either need to click on different cell locations in
succession whilst holding down the "Ctrl" key, or you can type in each cell location or
parameter name followed by a comma.
Click the button below if you wish to check the settings in Solver.
Show

11. Click on the Solve button.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.10: Part 3 (Practical): Calculating R0 using the


simultaneous equations approach
page 88 of 97

prev

next

Q3.5 What values do you get for R0_est, x and w?


Answer

12. Change the value for R0_est to equal 0.99, and reset x and w to take their previous
values (x = 0.8, w = 0.15 and z = 1-x-w). Re-run the Solver option.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.11: Part 3 (Practical): Calculating R0 using the


simultaneous equations approach
page 89 of 97

prev

next

Q3.6 What values do you get for R0_est? Is this the basic reproduction number? Why?
(Hint: what are the values for x and w?)
Answer

This question highlights the fact that there is more than one solution for the "R0" term for
equation A , and therefore it is important that you choose the correct value if you use the
simultaneous equation approach to calculate R0. As discussed on page 44 , the actual
basic reproduction number is just the maximum value for R0 which satisfies equation A
(known as the "dominant eigenvalue of the Next Generation Matrix").
On the other hand, the simulation approach almost always leads to the correct value for
R0. You can therefore check that the value obtained using the simultaneous equation
approach is correct by comparing its value against that obtained using the simulation
approach.
We have now completed part 3 of this session and you have now had the chance to
practice two approaches which can be used to calculate the basic and net reproduction
number for an infection. You will get a further opportunity to apply this theory in MD08.
The next few pages summarise the key points that we have covered in the session, and
provide further exercises that you can try.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 22: Summary


page 90 of 97

prev

1. The value for the basic reproduction number, R0


that is required to control transmission.

next

determines the level of control

2. If we assume that individuals mix randomly and that the infection is at equilibrium, R0
can be calculated by using the following equations, depending on assumptions about
the demography in the population and the natural history of the infection:
Equation

Assumptions

R0 L/A

Immunising infection, rectangular


age distribution, stable population,
L = life expectancy, A = average
age at infection

R0 1+L/A

Immunising infection, exponential


age distribution, stable population,
L = life expectancy, A = average
age at infection

R0 N/(B(A-M))

Immunising infection, any general


demography, B = number of
surviving births, A = average age at
infection (which is small), M =
duration of maternal immunity

R0 = 1/(1-i*)

Non-immunising (SIS-type)
infection. i is the equilibrium
prevalence of infection (or,
equivalently, for this type of
infection, of infectious individuals).

3. These equations are obtained using the relationship R0 = 1/s*, where s* is the
equilibrium proportion of the population that is susceptible. This equation is derived
from the expression for the net reproduction number (Rn = R0 s, where s is the
proportion of the population that is susceptible) and using the result that Rn = 1 at
equilibrium.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.1: Summary
page 91 of 97

prev

next

4. When we assume that individuals mix non-randomly, the basic reproduction number
is defined as the average number of secondary infectious individuals resulting from
the typical infectious person when introduced into a totally susceptible population. A
typical infectious person is defined as some hypothetical person who partly belongs
to each of the subgroups in the population.
5. When we assume that individuals mix non-randomly and that the infection is at
equilibrium, R0 is calculated by following the steps below:
Step 1: Measure the prevalence of previous infection in the population using a
serosurvey.
Step 2: Estimate the forces of infection in different subgroups (e.g. age strata).
Step 3: Choose the structure of the matrix of Who Acquires Infection From Whom
(WAIFW).
Step 4: Calculate the parameters for the WAIFW matrix.
Step 5: Formulate the Next Generation Matrix.
Step 6: Calculate R0 from the Next Generation Matrix.
6. For a population comprising two groups (the young and old, denoted by the symbols
y and o respectively), the Next Generation Matrix is given by the following:

In this matrix,
Ryy is the number of young secondary infectious individuals generated by
each infectious young person;
Ryo is the number of young secondary infectious individuals generated by
each infectious old person;
Roy is the number of old secondary infectious individuals generated by
each infectious young person;
Roo is the number of old secondary infectious individuals generated by
each infectious old person.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.2: Summary
page 92 of 97

prev

next

7. When calculating the basic reproduction number, Ryy, Ryo, Roy and Roo are evaluated
using the following equations:
Ryy = yy Ny D
Ryo = yo Ny D
Roy = oy No D
Roo = oo No D
In these equations,
yy is the rate at which two specific young individuals come into effective
contact per unit time;
yo is the rate at which a specific young susceptible person comes into
effective contact with a specific old infectious person;
oo is the rate at which two specific old individuals come into effective
contact per unit time;
oy is the rate at which a specific old susceptible person comes into
effective contact with a specific young infectious person;
Ny and No are the number of young and old individuals in the population,
and
D is the duration of infectiousness.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.3: Summary
page 93 of 97

prev

next

8. The basic reproduction number can be calculated for a given Next Generation Matrix
using the following three main approaches:
a. Simulating the introduction of infectious individuals into a totally susceptible
population in which individuals contact each other according to the given Next
Generation Matrix, and in which there is an unlimited supply of susceptible
individuals. During this module, we refer to this method as the "simulation
approach".
R0 is then given by the ratio between the number of infectious individuals in
successive generations, once this ratio has converged. The proportion of
individuals in each generation which belongs to each population subgroup also
converges. These proportions are said to reflect the proportion of the typical
infectious person which belongs to each of the population subgroups.
b. Considering a population in which individuals are stratified into two population
groups (the young and the old, denoted by the symbols y and o respectively),
R0 can be calculated by finding the maximum value for R0 which satisfies the
following equation:

Equation 18

Here x is the proportion of the typical infectious person who belongs to the
young group. During the module, we refer to this method as the "simultaneous
equations approach".
c. Considering a population in which individuals are stratified into two population
groups (the young and the old, denoted by the symbols y and o respectively),
R0 equals the maximum value for which satisfies the following equation:
(Ryy - )(Roo - ) - RyoRoy = 0

Equation 24

During the module, we refer to this method as the matrix determinant


approach.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.4: Summary
page 94 of 97

prev

next

9. There is often more than one value for "R0" which satisfies Equation 18 and
Equation 24. R0 is taken as the maximum value which satisfies these equations. The
mathematical name for this maximum value is the "dominant eigenvalue of the Next
Generation Matrix".
10. Apart from some exceptional matrices (see exercise 2C for Model 7.4 of the online
material of the recommended course text 5 ), the simultaneous equations approach
for calculating R0 typically leads to the "correct" value for R0.
11. The herd immunity threshold, H, for populations in which individuals are assumed to
mix non-randomly is calculated in the same way that it is calculated for a randomly
mixing population, i.e. using the following equation:
H = 1-1/R0
12. The methods described above can be extended to calculate R0 for populations
comprising more than two subgroups.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.5: Summary
page 95 of 97

prev

next

13. The methods described on the previous pages can also be used to calculate the net
reproduction number for a population in which some individuals may be immune,
e.g. as a result of natural infection. In this situation, the Next Generation Matrix is
calculated using the number of susceptible individuals in each population group,
rather than the total number of individuals in each group, i.e.

Here, S y and S o are the numbers of susceptible young and old individuals in the
population.
14. Estimates of the net or effective reproduction number calculated with this approach,
together with estimates of the age-specific proportion of individuals who were
susceptible to measles obtained from serological data, were used to infer the
potential for a measles epidemic to occur in England during the mid 1990s6 . Based
on such estimates, a mass measles-rubella campaign was carried out in 1995.
These methods continue to be used to monitor the potential for measles epidemics
to occur in England.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.6: Further reading and exercises


page 96 of 97

prev

next

You have now seen how we can calculate the basic reproduction number to account for
non-random mixing between individuals.
For further reading and to consolidate your understanding, you should read Chapter 7,
sections 7.5-7.6 of the recommended course text 5 .
You should also try the following exercises:
1. Exercises accompanying models 7.3-7.7 for the recommended course text 5
www.anintroductiontoinfectiousdiseasemodelling.com ).

(see

2. The paper and pen exercises 7.4 and 7.5 at the end of chapter 7 of the
recommended course text 5 . Solutions are available from the books website.

MD07 Calculating R 0 for non-randomly


mixing populations
EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

References
page 97 of 97

prev

1. Fine, P.E., Herd immunity: history, theory, practice. Epidemiol Rev, 1993. 15(2): p.
265-302.
2. Fine, P.E., et al., The transmission potential of monkeypox virus in human
populations. Int J Epidemiol, 1988. 17(3): p. 643-50.
3. Diekmann, O., J.A. Heesterbeek, and J.A. Metz, On the definition and the
computation of the basic reproduction ratio R0 in models for infectious diseases in
heterogeneous populations. J Math Biol, 1990. 28(4): p. 365-82.
4. Diekmann O, H.J., Mathematical epidemiology of infectious diseases. Model building,
analysis and interpretation. Wiley series in Mathematical and Computational Biology,
ed. Wiley. 2000.
5. Vynnycky, E., and R.G. White, An Introduction to Infectious Disease Modelling.
2010: Oxford University Press.
6. Gay, N.J., et al., Interpretation of serological surveillance data for measles using
mathematical models: implications for vaccine strategy. Epidemiol Infect, 1995.
115(1): p. 139-56.
7. Choi, Y.H., et al., The potential for measles transmission in England. BMC Public
Health, 2008. 8: p.338.
8. Babad, H.R., et al., Predicting the impact of measles vaccination in England and
Wales: model validation and analysis of policy options. Epidemiol Infect, 1995.
114(2): p. 319-44.

You might also like