You are on page 1of 83

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into

models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 1: Overview and objectives


page 1 of 65

next

OVERVIEW
In the models that we have worked with so far in the module, we have assumed that
individuals mix randomly. In this session, we illustrate how we can incorporate the
assumption that individuals mix non-randomly (heterogeneously) into models. We will also
see how contact patterns between individuals influence the transmission dynamics and
control of infections.
OBJECTIVES
By the end of this session you should:
Be aware of some of the evidence for age-dependent mixing;
Be able to define and construct matrices of "Who Acquires Infection from Whom"
(WAIFW) to describe non-random mixing patterns between individuals;
Know how to use force of infection estimates to calculate WAIFW matrices;
Understand how non-random mixing patterns between individuals can affect the
transmission dynamics and control of infections.
This session comprises two parts and will take 2-5 hours to complete.
Part 1 (1-2 hours) describes some of the evidence which shows that people mix nonrandomly and the methods for writing down and calculating matrices of Who Acquires
Infection From Whom. Part 2 (1-3 hours) consists of a practical exercise in Berkeley
Madonna, during which you will use a model to explore how different assumptions about
contact between individuals influence the impact of vaccination.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 2: Introduction
page 2 of 65

prev

next

So far in this module, we have assumed that contact between individuals in a population is
random (regardless of characteristics such as age, gender or socio-economic status) and
that all individuals are equally likely to contact any other individual.
However, non-random ("heterogeneous") mixing is especially important in determining the
impact of control strategies, particularly those targeting certain subgroups.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

2.1: Introduction
page 3 of 65

For example, shown below are contact patterns between children


two different hypothetical populations.

prev

and adults

next

for

In population A, each child contacts four other children and two adults, and each adult
contacts one child and two adults. In population B, each child contacts one other child and
three adults, and each adult contacts three children and one adult.
Suppose the same proportion of children in both populations have been vaccinated against
a new pandemic strain of influenza, but no adults are vaccinated.
Before proceeding, try to answer the following question: In which population is the
incidence likely to be smallest once the new strain is introduced?

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

2.2: Introduction
page 4 of 65

prev

next

The previous question is intended to illustrate the fact that predicting the impact of an
intervention that is introduced into a non-randomly mixing population is not straightforward.
For example, on the one hand, you might argue that the impact of vaccinating children will
be greater in population A than in population B, since children in population A contact
more individuals than do children in population B (i.e. 6 vs. 4).
However, we need to weigh this up against the fact that children in population A contact
fewer adults than do children in population B (i.e. 2 vs. 3). Consequently, reducing the
number of infectious children through vaccination will have a smaller impact on the number
of new infections occurring per unit time among adults in population A than in population
B.
In fact, using a simple argument which you can see by clicking on the show button below,
we can show that we might expect the impact of vaccinating children to be greatest in
population B. However, we would need to use a transmission model if we wish to answer
detailed questions such as "How many new infections might be expected to occur per unit
time in populations A and B following the introduction of the new strain if, for example,
30% of children had been vaccinated?"
Show

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

2.3: Introduction
page 5 of 65

prev

next

In order to make reasonable predictions of the impact of interventions against infections in


real populations (in which individuals do not mix randomly) models need to include
assumptions about the amount of contact between individuals in different subgroups of the
population.
Before describing the methods for incorporating non-random mixing into models, we first
review some of the evidence for age-dependent mixing.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 3: Background: Evidence for non-random mixing


page 6 of 65

prev

next

There is much evidence to suggest that contact patterns are age-dependent.


One study in The Netherlands1 , examined the ages of pairs of tuberculosis cases who
had onset during the period 1993-1996 and whose isolates shared identical M tuberculosis
DNA fingerprint patterns (Figure 1a).
It is reasonable to assume that these pairs represented a primary and a secondary case,
although it is possible that both cases were infected by another person outside of the
study1 .
Figure 1a shows that the ages of the two cases in the pairs were highly correlated,
indicating that individuals are most likely to transmit infection to others of a similar age. For
example, the average age difference between individuals in a pair was 13.9 years (SD
12.2 years), which is statistically significantly smaller than the difference between that of
randomly paired cases (25.5 years, 95% CI 21.5-29.5 years).
Analogous age patterns have been observed between presumed primary and secondary
cases of measles and meningococcal meningitis in the UK from the period 1995-1998
(Figure 1b)2 .

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

3.1: Background: Evidence for age-dependent mixing


page 7 of 65

prev

next

The largest study of contact patterns (the POLYMOD study3 ) was published in 2008.
Individuals from eight European countries completed a diary detailing their physical and
non-physical contacts on a single day between May 2005 and September 2006. A total of
7,290 diaries were collected, and the number of diaries collected per country ranged from
267 in The Netherlands to 1,328 in Germany3 .
The contact patterns observed were generally consistent across countries: individuals
were most likely to contact others of a similar age (see Figure 2 for data from Great Britain
and Germany). The study also found that there was much contact between 30-39 year
olds and young children, and between middle-aged adults and older children. Contact
between these individuals probably reflects contact between parents and their children.
Additional evidence for age-dependent contact is provided in section 7.3.3 of the
recommended course text 4 . You may prefer to read this section after you have
completed the session.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 4: Revision of the relationship between , the force


of infection and the number of infectious individuals for a
randomly mixing population
page 8 of 65

prev

next

As we saw in MD01 , when we assume that individuals mix randomly, the rate at which
susceptible individuals are infected at a given time t (the force of infection, (t)) is
expressed in terms of two quantities, namely:
1. The contact parameter, (the rate at which two specific individuals come into
effective contact per unit time) and
2. The number of infectious individuals at that time, I(t).
i.e. (t) = I(t)
, in turn, is related to the number of contacts that each person makes with others and the
proportion of contacts which are sufficient to lead to transmission of infection (which
depends on the infection).
However, as empirical data on the numbers of contacts that individuals typically make are
rare, is usually inferred from epidemiological data.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

4.1: Revision of the relationship between , the force of


infection and the number of infectious individuals for a
randomly mixing population
page 9 of 65

prev

next

For randomly mixing populations (see MD01 ), can be calculated from the basic
reproduction number (R0) using the following expression:
=

R0
ND

where N is the total population size and D is the duration of infectiousness. As we saw in
MD04 , R0 can be calculated using the average force of infection or the average age at
infection.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 5: Methods for incorporating non-random mixing into


models
page 10 of 65

prev

next

In populations where individuals do not mix randomly, the relationship between the force of
infection, , and the number of infectious individuals is analogous to that used for
randomly mixing populations, except that the force of infection and must be stratified
according to the subgroups represented in the model.
Example
Suppose we have a population in which the contact patterns of children differ from those of
adults. The rate at which children are infected depends on how closely they interact with
other children and with adults. The subscript y will be used to denote children (the
young) and the subscript o will be used to denote adults (the old).
At time t, the overall force of infection experienced by children
the sum of two terms:

can be expressed as

the force of infection attributable to contact between children ( yy(t)), and


the force of infection attributable to contact between children and adults ( yo(t)), i.e.
y(t) = yy(t)+ yo(t)

Equation 1

Similarly, the overall force of infection experienced by adults at time t


sum of:

is given by the

the force of infection attributable to contact between adults ( oo (t)) , and


the force of infection attributable to contact between adults and children ( oy(t)), i.e.
o(t)= oo (t)+ oy(t)

Equation 2

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.1: Methods for incorporating non-random mixing into


models
page 11 of 65

prev

next

As we shall show on the next few pages, each of the terms yy(t), yo(t), oo (t), oy(t) can
be expressed in terms of the product of two factors, namely the rate at which effective
contacts are made between individuals in different subgroups (for example, between one
specific child and another specific child, yy) and the number of infectious individuals in the
subgroup (e.g. children, I y(t)).

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.2: Methods for incorporating non-random mixing into


models
page 12 of 65

prev

next

For example, the force of infection among children that is attributable to contact with other
children is given by the following equation:
yy(t) = yy I y (t)

Equation 3

where yy is the rate at which a specific susceptible child and a specific infectious child
come into effective contact per unit time, and I y(t) is the number of infectious children at
time t.
The definition and interpretation of yy is analogous to that for when we assume that
individuals mix randomly. Click here if you would like to remind yourself of this.
Similarly, the force of infection among children that is attributable to contact with adults is
given by the following expression:
yo(t) = yo I o (t)

Equation 4

where yo is the rate at which a specific susceptible child and a specific infectious adult
come into effective contact per unit time, and I o(t) is the number of infectious adults at time
t. The definition and interpretation of yy is analogous to that for when we assume that
individuals mix randomly. Click here if you would like to remind yourself of this.
These expressions are derived on the following page.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.3: Methods for incorporating non-random mixing into


models
page 13 of 65

prev

next

Proof that yy (t) = yy I y (t)


As we saw in previous sessions, if we assume that individuals mix randomly, the number
of new infections per unit time is given by the expression:
S(t)I(t)
Extending this logic, the number of new infections among children that is attributable to
contact with other children is given by the expression:
yy S y(t)I y(t)
We can also express the number of new infections among children that is attributable to
contact with other children using the following expression:
yy(t)S y(t)
Equating the expression yy(t)S y(t) to yy S y(t)I y(t) results in the following equation:
yy(t)S y(t) = yy S y(t)I y(t)
Cancelling S y(t) from both sides of this equation leads to the result that we are looking for:
yy(t) = yy I y(t)

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.4: Methods for incorporating non-random mixing into


models
page 14 of 65

prev

next

By applying a similar argument, we can show that the force of infection among old people
that is attributable to contact with children and adults is given by the equations:
oy(t) = oyI y(t)

Equation 5

oo (t) = oo I o(t)

Equation 6

where oy is the rate at which a specific susceptible adult and a specific infectious child
come into effective contact per unit time;
oo is the rate at which a specific susceptible adult and a specific infectious adult come
into effective contact per unit time;
I y(t) is the number of infectious children at time t;
I o(t) is the number of infectious adults at time t.
Note on subscripts

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

5.5: Methods for incorporating non-random mixing into


models
page 15 of 65

prev

next

We can now use our expressions for yy(t) and yo(t) to obtain an expression for the overall
force of infection among children in terms of yy and yo, as we shall show below.
Substituting yyI y (t) for yy(t) and yoI o (t) for yo(t) into the following equation (Equation 1
).
y(t) = yy(t)+ yo(t)

gives the following:


y(t) =yyI y(t)+ yoI o(t)

Equation 7

Likewise, substituting oyI y (t) for oy(t) and oo I o (t) for oo (t) into the following equation
(Equation 2 )
o(t)= oo (t)+ oy(t)

gives the following:


o(t)=oo I o(t)+ oyI y(t)

Equation 8

Equations 7 and 8 for the force of infection among children and adults respectively, are
often written using the following matrix notation:

Equation 9

The term in brackets,

, in this equation is known as the matrix of "Who Acquires

Infection From Whom" or, using its abbreviation, as the WAIFW matrix. This matrix can
include further subgroups, depending on the number of subgroups in the model.
We shall now revise the notation that is used for matrices. If you are already familiar with
matrices you may like to skip to page 18 .

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 6: Revision of matrices


page 16 of 65

prev

next

Matrices lead to a convenient format for summarising sets of equations that must be
solved simultaneously.
Example
can be represented as
You should notice several features about how equations are written using matrices:
The terms in front of x and y in the first equation (i.e. 5 and 7) go into the first row
of the matrix.
The terms in front of x and y in the second equation (i.e. 3 and 4) go into the
second row of the matrix.
The variables x and y appear immediately after the matrix using the notation

The constant terms on the right hand side of the equations (6 and 3 for the first and
second equations respectively) appear on the right hand side of the matrix equation,
using the notation

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

6.1: Revision of matrices


page 17 of 65

prev

next

In a similar way, when we have three equations with three unknown variables we can use
matrix notation to represent the equations, as illustrated below.
4x + 8y + 3z = 18
4 8 3
2x +y + 5z = 12 is equivalent to 2 1 5
x + 3y + 3z = 4
1 3 8

x
y
z

18
12
4

Q1.1
a) Rewrite the following equations using matrix notation:
3x + 2y = 6
5x + 5y = 3
Answer

b) Write the equations corresponding to the following matrix equation:


8 1

2 5

Answer

6
2

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 7: Exercise: Calculating the force of infection from


the WAIFW matrix and the numbers of infectious individuals
page 18 of 65

prev

next

We will now practise calculating the force of infection using the parameters in a WAIFW
matrix and estimates of the numbers of infectious individuals.
Suppose we have a population with 20 infectious children and 50 infectious adults, and
suppose the WAIFW matrix describing the rate at which children and adults come into
effective contact per year with each other is given by the following matrix (in which children
and adults are denoted using the symbols y and o respectively):

-4
-4
y 5.2 10 2.8 10
o 2.8 10-4 3.6 10-4
Q1.2 Write down the matrix equation relating the force of infection at a given time t among
children and adults to the WAIFW matrix and number of infectious children and adults.
Click here

if you need to remind yourself of the notation

Answer

Q1.3 Calculate the force of infection at time t among


a) children which is attributable to contact with the following (click here
yourself of the equations if necessary):
i. other children

Answer

ii. adults

Answer

iii. both children and adults

Answer

to remind

b) adults which is attributable to contact with:


i. children

Answer

ii. other adults

Answer

iii. both children and adults

Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 8: Calculating the parameters in WAIFW matrices


page 19 of 65

prev

next

We will now consider how we might obtain values for yy, yo, oy and oo to use in our
equation for the force of infection.
As we saw previously, when we assume that individuals mix randomly, can be
calculated from R0 which, in turn, is calculated using the average force of infection, as
estimated from serological data.
We can also use serological data to estimate yy, yo, oy and oo , except that we use the
data to estimate the average force of infection in children and adults and the average
numbers of infectious children and adults.
As we shall show on the next few pages, these values for the average force of infection in
children and adults and the average numbers of infectious children and adults are then
substituted into the matrix equation for the force of infection, and the equations are
rearranged until we obtain values for our parameters.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.1: Calculating the parameters in WAIFW matrices


page 20 of 65

prev

next

For example, in MD04 we used serological data to estimate the annual force of rubella
infection to be 13% and 4% for children and adults respectively in England and Wales
= 0.13 per year and
= 0.04 per year.
during the 1980s, i.e.
Note

Suppose we consider a region in England and Wales, such as Cornwall, which comprises
about 500,000 individuals.
Using methods discussed later in this session , we can estimate that there were 172
and 26 infectious children and adults respectively with rubella in Cornwall at any given
time during the 1980s, i.e. I y = 172 and I o = 26.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.2: Calculating the parameters in WAIFW matrices


page 21 of 65

prev

next

Substituting for
= 0.13 per year,
= 0.04 per year and I y = 172 and I o = 26 into our
matrix equation for the force of infection:

leads to the following equation:

As discussed on page 16
equations:

, this equation can also be written using the following two

172 yy + 26 yo = 0.13
172 oy + 26 oo = 0.04
However, there are four unknown parameters in two equations. This presents a problem
as only two unknown parameters can be calculated from two equations.
This problem can be overcome by constraining the structure of the matrix so there are two
equations with two unknowns.
There are different methods of constraining matrices.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

8.3: Calculating the parameters in WAIFW matrices


page 22 of 65

prev

next

One constraint that is frequently applied is that contact is symmetric.


For example, we can assume that the rate at which a child contacts and transmits infection
to an adult (which equals oy) equals the rate at which an adult contacts and transmits
infection to a child (which equals yo), i.e. yo = oy. This constraint has reduced the
number of unknown parameters to three in two equations. Our WAIFW matrix can
therefore be written as follows, where yo and oy have been substituted by the symbol 1.

One additional constraint is required to reduce the number of unknown parameters in our
matrix to two.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 9: Matrix structures: symmetric matrices


page 23 of 65

prev

next

An additional potential constraint is that the rate at which an adult contacts and infects a
child equals the rate at which an adult contacts and infects an adult (i.e. yo = oo = 1).
Our matrix would then have the following structure:

An alternative constraint is that the rate that a child contacts and infects an adult equals
the rate a child contacts and infects another child (i.e. oy = yy), which leads to a matrix
with the following structure:

Q1.4 What is assumed about contact between children and adults (denoted by the letters y
and o respectively) in the following matrix?

Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

9.1: Matrix structures: symmetric matrices


page 24 of 65

prev

next

The approach described on the last few pages can be extended to deal with more than two
subgroups. A recent publication by Kanaan and Farrington 5 , describes the kinds of
WAIFW structures that have typically been used in modelling studies.
An example of a matrix structure from this publication is shown below.

The parameters 1, 2, 3, 4, 5 represent distinct values for the parameters. Contact is


assumed to vary between the age groups 0- 3, 3- 8, 8- 13, 13- 20, 20+ years.
Q1.5 What assumptions does this matrix make about effective contact between
individuals?
Answer

The increased availability of data, such as those collected through the POLYMOD study
, greatly helps in deciding which matrix structure is appropriate in a population. However,
there are several complications which need to be considered when using the POLYMOD
data to calculate the parameters for a WAIFW matrix.
First, the POLYMOD data provide information on the number of contacts that individuals in
different age groups made during the survey, and this number probably differs from the
number of effective contacts that they made. In theory, the latter could be calculated by
multiplying the number of contacts made by each person by the proportion of the contacts
that are effective.This proportion is likely to differ between infections and may well differ
between different age groups. It may also differ between populations, depending on the
interpretation of the word contact by participants of the contact survey.Ongoing studies

are likely to provide insight into this question in future.Panel 7.6 of the recommended
course text 4 , summarises attempts to calculate this proportion for mumps by Wallinga et
al6 .
Second, the generalisability of the findings from a given survey is unclear. For example,
the POLYMOD study found that the amount of contact between individuals in different age
groups were similar in each country studied, with the number of contacts between
individuals in the same age group being greater than the corresponding number between
individuals in different age groups.However, the absolute numbers of individuals
contacted by each person differed between countries .Also, the study focussed on
European countries and it is possible that different findings would have been obtained in
low income settings.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 10: Matrix structures: asymmetric matrices


page 25 of 65

prev

next

The following are examples of asymmetric matrices:


A.

B.

C.

Such matrices are considered to be unrealistic for many infections as they assume that the
rate at which a child contacts and infects an adult differs from the rate at which an adult
contacts and infects a child.
On the other hand, asymmetric matrices may be used to describe the transmission of other
types of infections, such as sexually transmitted infections between males and females,
infections transmitted via the faecal-oral route between children and adults, or vectorborne infections between humans and vectors.
Q1.6 Which matrix might we use to describe transmission of:

a) Polio between children and adults?

b) Gonorrhea between heterosexual males and


females?

c) Malaria between mosquitoes and humans?

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 11: Matrix structures


page 26 of 65

Q1.7 Drag the following matrices to the appropriate box.

prev

next

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

11.1: Matrix structures


page 27 of 65

prev

next

As highlighted on page 25 , matrices can be used to describe mixing patterns between


many different types of groups (for example between males and females, humans and
vectors, etc.). Matrices can also be used to describe mixing between individuals living in
different areas, for example, between individuals from urban and rural areas.
Q1.8 Which of the following matrices might we use to describe mixing between individuals
from:
1. An urban and a rural area (denoted by u and r respectively).Click on the appropriate
button next to the matrix to select your matrix.

2. Two urban areas (denoted by u1 and u2). Click on the appropriate button next to the
matrix to select your matrix.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 12: Estimating parameters for endemic infections,


given estimates of the force of infection and the number of
infectious individuals
page 28 of 65

prev

next

We now return to our example on page 21 , where we wished to calculate the rate at
which adults and children come into effective contact for rubella in a region in England
which comprises 500,000 individuals and is similar in size to Cornwall. In that example, we
needed to solve the following matrix equation:

given values for the average force of infection among children and adults of 13% and 4%
per year respectively, and estimates of 172 and 26 infectious children and adults
respectively.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.1: Estimating parameters for endemic infections, given


estimates of the force of infection and the number of
infectious individuals
page 29 of 65

prev

next

For now, suppose the WAIFW matrix has the following structure, which assumes that the
rate at which a child contacts and infects an adult equals the rate at which an adult
contacts and infects either another adult or a child (i.e. oy = oo = yo). In this matrix, yy
has been substituted by 1 and yo, oy, and oo have been substituted by 2.

Substituting this matrix into our matrix equation gives the following equation:

This equation can be rewritten as follows:


0.13 = 1721+ 262

Equation 10

0.04 = 1722 + 262

Equation 11

Equation 11 can be simplified to give the following equation:


Equation

0.04 = 1982

12

Dividing both sides of this equation by 198 gives the following value for 2:
2 = 2.02 x 10-4 per year

Equation

13

If we divide this value for 2 by 365 we obtain the following value for 2 in units of per day:
2 = 2.02 x 10-4 / 365 = 5.53 x 10-7 per day
Note about rounding

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.2: Estimating parameters for endemic infections, given


estimates of the force of infection and the number of
infectious individuals
page 30 of 65

prev

next

As we saw on page 29, 1 and 2 are related according to the following equation:
0.13 = 1721+ 262

Equation 10

We can substitute the calculated value for 2 (2.02 x 10-4 per year ) into Equation 10 to
obtain an expression in terms of 1:
0.13 = 1721+ 26 x (2.02 x 10-4)

Equation 14

After simplifying this equation, we obtain the following:


0.13 = 1721 + 5.252 x 10-3

Equation 15

Rearranging this equation gives:


0.1247 = 1721

Equation 16

After dividing both sides of this equation by 172, we obtain the following:
1 = 7.25 x 10-4 per year

Equation 16

Converting this value into a daily rate by dividing by 365 provides the following value for 1
:
1 = 7.25 x 10-4 / 365 = 1.99 x 10-6 per day.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.3: Estimating parameters for endemic infections, given


estimates of the force of infection and the number of
infectious individuals
page 31 of 65

prev

next

The resulting WAIFW matrix, with parameters in units of per day, is:

Figure 3 provides a graphical illustration of this matrix.

Figure 3. Summary of the WAIFW matrix obtained using the forces of rubella infection estimated for children and
adults in a region comprising 500,000 individuals (i.e. similar in size to Cornwall) in England and Wales.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

12.4: Estimating parameters for endemic infections, given


estimates of the force of infection and the number of
infectious individuals
page 32 of 65

prev

next

Q1.19 Considering the same population of 500,000 individuals and assuming the average
force of infection among children and adults to be 13% and 4% per year respectively, with
172 infectious children and 26 infectious adults, calculate the parameters describing
contact between children and adults using the following matrix structure:

Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 13: Methods for calculating the number of infectious


individuals
page 33 of 65

prev

next

We will now consider how we can calculate the number of infectious individuals in the
population. As we have seen in the last few pages, we can then use the values to
calculate the parameters for a given WAIFW matrix.
In general, we can calculate the average number of infectious individuals in a population
using the following approximation:
Number of infectious individuals Number of new infections per
unit time Duration of infectiousness
assuming further that all individuals are infectious shortly after infection.
As we saw previously , if we assume that individuals mix randomly, the average number
of new infections per unit time in a population can be calculated from the total number of
susceptible individuals, S, and the average force of infection, , using the expression:
Average number of new infections in the overall population per unit time = S
Similarly, the average number of new infections among children and adults per unit time in
a population can be calculated from the average force of infection among children ( ) and
adults ( ), and the average number of susceptible children (S y) and adults (S o), using the
expressions:
Average number of new infections among children per unit time =
Average number of new infections among adults per unit time =

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

13.1: Methods for calculating the number of infectious


individuals
page 34 of 65

prev

next

Using the relationship between the number of infectious individuals and the number of new
infections occurring per unit time described before and assuming that the duration of
infectiousness is D, we obtain the following equation for the average number of infectious
children and adults in the population:
Average number of infectious individuals (assuming random mixing) SD
Average number of infectious children
Average number of infectious adults
As we saw in MD04 the average number of susceptible individuals, S, in a population
can be calculated from the average age at infection, which is related to the average force
of infection (see page 22 of MD04 ).
Similarly, the average number of susceptible individuals in a given age group can be
calculated from the average age-specific force of infection.
On the next few pages, we will illustrate how we can calculate both the number of
susceptible and infectious individuals assuming that individuals mix either randomly or
non-randomly. Here we will derive the numbers of young and old infectious individuals with
rubella in the region of England (Cornwall) that we presented on page 20 .
If you prefer, you may skip these calculations now and proceed to the second (practical
part of this session. You will probably find it helpful to return to these calculations either
whilst you are doing the practical or after you have completed the session.
The next few pages illustrate the calculations for the assumption that individuals mix
randomly.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 14: Methods for calculating the number of


susceptible and infectious individuals, assuming that
individuals mix randomly
page 35 of 65

prev

next

As we saw in MD04, if we assume that individuals mix randomly, the average proportion of
the population that is susceptible in the absence of an intervention, s, can be calculated
from the basic reproduction number using the following equation:
s=1/R0
As we saw in MD04

R0 can be calculated from the average force of infection.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.1: Methods for calculating the number of susceptible and


infectious individuals, assuming that individuals mix
randomly
page 36 of 65

prev

next

EXAMPLE
In MD04 , we estimated that the average force of rubella infection in England and Wales
was about 12% per year during the 1980s and the basic reproduction number, assuming a
life expectancy of 75 years, was 9.
Assuming that individuals mix randomly, and applying the equation s=1/R0 implies that the
average proportion of the population that was susceptible to rubella infection was 1/9
0.111.
We will now use this infomation to calculate the number of susceptible and infectious
individuals in the region in England (Cornwall) that we considered on page 20 .
The population in that area comprised about 500,000 individuals. Multiplying the proportion
susceptible by 500,000 leads to an estimate of 500,000 0.111 55,500 susceptible
individuals.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

14.2: Methods for calculating the number of susceptible and


infectious individuals, assuming that individuals mix
randomly
page 37 of 65

prev

next

EXAMPLE CTD.
We can now calculate the number of infectious individuals in Cornwall by multiplying the
number of susceptible individuals obtained on the previous page by the force of infection
and the duration of infectiousness, using the equation presented on page 34 .
However, when doing this calculation, we need to ensure that the units that we use for the
force of infection are consistent with the units that we use for the duration of
infectiousness. For example, if we use the value for the annual force of infection (about
12% per year ), the value for the duration of infectiousness must also be in annual units.
The average duration of infectiousness for rubella is 11 days. Dividing this value by 365
gives a value for the duration of infectiousness in time units of years of 11/365 = 0.030
years.
We can now calculate the number of infectious individuals with rubella in Cornwall during
the 1980s by substituting 0.12 per year for , 55,500 for S, and 11/365 for D in the
equation SD that we discussed on page 34 :
0.12 x 55,500 x (11/365) 201 infectious individuals
On the next few pages, we will illustrate how we can calculate the number of susceptible
and infectious individuals if we assume that individuals mix non-randomly.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 15: Methods for calculating the number of


susceptible and infectious individuals, assuming that
individuals mix non-randomly
page 38 of 65

prev

next

In MD04 , we presented the equations that might be used to calculate the proportion of
individuals that are susceptible to an immunising infection at different ages, assuming that
the force of infection is age-dependent.
For example, if the average force of infection differs between those aged less than 15
years, and those aged at least 15 years (denoted by
and
respectively), the proportion
susceptible would be given by the following equations:

We can obtain the number of individuals that are susceptible at each age a (S(a)) by
multiplying s(a) by the number of individuals of that age (N(a)), i.e.
S(a) = N(a)s(a)

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

15.1: Methods for calculating the number of susceptible and


infectious individuals, assuming that individuals mix nonrandomly
page 39 of 65

prev

next

Figure 4 shows how the number of susceptible individuals of age a (S(a)) might change by
age for a population with a rectangular age distribution of size N and a life expectancy
of L (=75 years), assuming that the force of infection changes at age 15 years.

Figure 4: A. Illustration of the relationship between the number of susceptible individuals and age for a population
of size N with a rectangular age distribution (as shown in figure B), assuming that the force of infection differs
between those aged under and over 15 years. If the life expectancy is L (=75 years), the proportion of the total
population that is in each single year age band equals 1/L (=1/75) and the number of individuals in each single
year age band equals N/L (=N/75). The shaded portion of these figures reflects individuals who are aged 0-15
years (i.e. children).

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

15.2: Methods for calculating the number of susceptible and


infectious individuals, assuming that individuals mix nonrandomly
page 40 of 65

prev

next

The number of individuals in a given age range that are susceptible can be obtained by
summing up the values for S(a) for all values of a in the age ranges of interest.
For example, to calculate the number of 0-15 year olds that are susceptible, we would sum
up the values for S(a) for values for a of between 0 and 15 years. This is equivalent to
summing the area under the plot of S(a) between the ages 0 and 15 years, shown by the
shaded area in Figure 4A .
You may recall from your previous mathematical training that we can calculate the area
under a curve by integrating the expression which leads to that curve. If you are interested,
further details about how we can integrate expressions are provided on page 17 of the
maths refresher and the Basic maths section of the recommended course text 4 . By
integrating the expression for the number of susceptible individuals of age a shown on
page 38 , we can show that the numbers of susceptible children and adults for the
example in Figure 4 are given by the following equations:

Note that we do not expect you to be able derive these equations


(although you may try to do this, if you wish!). For the purposes of this
study module, it is sufficient for you to be aware of the methods that are
used.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

15.3: Methods for calculating the number of susceptible and


infectious individuals, assuming that individuals mix nonrandomly
page 41 of 65

prev

next

EXAMPLE
We will now return to the example that we discussed on page 20 , and illustrate how we
can calculate the number of children and adults who were susceptible or infectious with
rubella during the 1980s at a given time in a region in England, which is similar in size to
Cornwall.
Substituting for the force of infection estimated for children and adults ( = 0.13 per year
and = 0.04 per year), the total population size (N = 500,000) and the life expectancy (L
= 75 years) into our equations for S y and S o leads to the following:
-0.1315
)
S y = 500,000 (1 - e
43,986 individuals
0.13 75
-0.1315
(1 - e -0.04(75-15) )
S o = 500,000 e
21,561 individuals
0.04 75

We can now calculate the number of infectious children and adults in the region by
substituting for = 0.13 per year and = 0.04 per year and the duration of infectiousness
for rubella (D = 11 days = 11/365 years) into the expressions for the average number of
as follows:

infectious children and adults

You should notice that these values are identical to the values presented on page 20

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 16: Break...


page 42 of 65

prev

next

We have now completed part 1 of this session, in which we covered the theory for
including assumptions about non-random mixing between individuals into models.
The rest of this session (part 2) consists of a practical exercise using Berkeley Madonna.
It is likely to take 1-3 hours to complete.
You may like to take a short break before starting it.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 17: Part 2 (practical): The effect of non-random


mixing on rubella transmission and control
page 43 of 65

prev

next

OVERVIEW
We will now start part 2 of this session in which we incorporate non-random mixing into a
model of the transmission dynamics of rubella, which is set up in Berkeley Madonna, and
explore the effect of non-random mixing on the impact of vaccinating children.
OBJECTIVES
By the end of this part of the session you should:
Be able to define a WAIFW matrix;
Be able to use estimates of the force of infection and the number of infectious
individuals to calculate the WAIFW matrix for different assumptions about mixing
between individuals;
Understand the effect of non-random mixing patterns on the impact of a vaccination
strategy.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 18: Part 2 (practical):Introduction to the model


page 44 of 65

prev

next

In MD04 , we presented estimates for the force of rubella infection for the UK for those
aged <15 and 15 years. For the purpose of this exercise, we shall stratify those aged
15 years into the 15-29 and 30 year age groups. We will also assume that the force of
infection in these two age groups is identical to that estimated for all individuals aged 15
years.
Age group
(years)

Average annual
force of infection

Average daily
force of infection

0-14

0.13286

3.64 x 10 -4

15-29

0.0417

1.14 x 10 -4

30

0.0417

1.14 x 10 -4

Table 1: Summary of the estimates for the age-specific force of infection for rubella for the UK

The differences in the force of infection between age groups may be a result of agedependent mixing between individuals (i.e. the parameters may be age-dependent).

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.1: Part 2 (practical): Introduction to the model


page 45 of 65

prev

next

To describe the transmission dynamics of rubella in the UK, which accounts for the agedependency in the force of infection that we discussed on the previous page, we will use a
model with the structure shown below.
In this model, the population is stratified into three age groups: the young, the middle-aged
and the old. Individuals move between age categories at a constant rate i.e. young
individuals enter the middle-aged category at a constant rate, middle-aged individuals
become old at a constant rate, etc.

Q2.1 How would you calculate the rate at which young and middle-aged individuals age,
assuming that they spend an average of 15 years in the young and middle-aged groups?
Answer


Optional reading about ageing

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.2: Part 2 (practical):Introduction to the model


page 46 of 65

prev

next

1.Start up Berkeley Madonna and click here to open the file rubwaifw flowchart.mmd
or rubwaifw equations.mmd , depending on whether you prefer to work with the
flowchart or equation editor versions of the models. Unless otherwise stated, the
instructions for this practical are identical for both files.
We will begin by reviewing the key features of the model.
Demography
a) The demography of the population is determined by the parameters in the section
called "Demographic parameters and variables" which can be found in the globals
window (flowchart version) or equations window (equation editor version). This section
also includes variables which calculate the total numbers of young, middle-aged and
old individuals (specified by tot_young, tot_mid and tot_old respectively).
b) Young and middle-aged individuals spend an average of 15 years in their respective
age groups. Old individuals spend an average of 30 years in their age compartment
prior to death. In the model, only individuals in the old age group can die . Therefore,
the overall average life expectancy in the model is assumed to be 60 years.
c) The total population size remains constant over time with 60,000 individuals (15,000
young, 15,000 middle-aged and 30,000 old individuals). You can see this by running
the model and looking at page 1 of the figures window, which plots the total numbers of
young (tot_young), middle-aged (tot_mid) and old (tot_old) individuals over time. Click
here to see the figure that you should see at this stage. Note that the red line for the
middle-aged category overlaps with the black line for the young category.You can see
the line for the young category by deselecting the plot for the middle-aged category.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.3: Part 2 (practical): Introduction to the model


page 47 of 65

prev

next

Infection and transmission


a) Parameters relating to rubella and transmission are defined in the section called
Infection-related parameters (in the globals window or equation editor window).
b) The pre-infectious and infectious periods are set to those for rubella (10 and 11 days
respectively).
c) Separate variables for the force of infection for each age group have been set up
(force_of_infn_y, force_of_infn_m and force_of_infn_o). At present, these have been
assigned fixed values corresponding to the values estimated for the force of infection
for rubella in the UK. We will change the settings for the force of infection later
(please do not do this yet!).
d) parameters defining mixing between individuals in the three different age groups have
been set up (b_yy, b_ym, b_yo, etc). These values are currently set to zero; we will
amend them later in the session.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.4: Part 2 (practical):Introduction to the model


page 48 of 65

prev

next

Vaccination
a) Parameters relating to vaccination are defined in the section called Vaccination-related
parameters (in the globals window or equation editor window).
b) Vaccination of newborns is introduced 100 years after the start of the simulations at a
level specified by the parameters birth_cov and prop_vacc. The time at which
vaccination is introduced is determined by the value of yr_start_vacc. At present, the
vaccination coverage is zero.
Summary variables
a) Summary variables have been set up in the "Useful summary variables" section of the
globals or equations window.
b) The summary variables include the proportion of young, middle-aged and old
individuals who are susceptible (specified by (prop_sus_y, prop_sus_m, prop_sus_o)
and the daily number of new infections among young, middle-aged and old individuals
per 100,000 population (specified by new_infn_y_p100000, new_infn_m_p100000 and
new_infn_o_p100000).

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

18.5: Part 2 (practical): Introduction to the model


page 49 of 65

prev

next

2. Run the model and look at pages 2 and 3 of the figures window to check that you obtain
the values for the average proportion of individuals in different age groups that are
susceptible and the daily number of new infections per 100,000 that are consistent with the
values in the table below. Recall that you can view the actual values by clicking on the
Table button
in the window.
You should notice that the values for the age-specific proportion of individuals that are
susceptible and the daily number of new infections per 100,000 are constant over time.
This is to be expected since the force of infection, which is used to calculate these
statistics, is currently set to be constant over time.
Age
Average %
category susceptible

Average
Average daily
daily
number of new
force of
infections/100,000
infection

Young

33.41

12.16

3.64
10 -4

Middleaged

20.56

2.35

1.14
10 -4

Old

9.13

1.04

1.14
10 -4

Table 2: Long-term values for the age-specific percentage of individuals that are susceptible and the daily
number of new infections per 100,000. See Appendix for details of the equations underlying these values.

If we wanted to explore the effect of vaccination, we would be unable to do this adequately


using the existing model, as it does not describe contact between children and adults, and
assumes that the force of infection remains unchanged over time.
To incorporate contact between individuals, we first need to calculate the values for the
parameters (b_yy, b_yo, etc) and then change our expression for the force of infection for
the young, middle-aged and old. We will do this on the next few pages.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 19: Part 2 (practical): Calculating the average


number of infectious individuals in the model
page 50 of 65

prev

next

In order to calculate the parameters for this model, we first need to calculate the average
number of infectious children, middle-aged and old individuals.
As we saw before , the average number of infectious children at a given time is given by
the following expression:

There are 15,000 young, 15,000 middle-aged and 30,000 old individuals in the population.
Q2.2 Using pen and paper, use the values for the percentage of individuals in different
age groups who are susceptible in Table 2 to calculate the average number of young,
middle-aged and old individuals who are susceptible.
Answer

Q2.3 Using pen and paper, use your answer to the previous question, the fact that the
average duration of infectiousness is 11 days and the age-specific values for the force of
infection in Table 2 to calculate the number of infectious young, middle-aged and old
individuals in the population.

Check: number of infectious children


Check: number of infectious middle-aged individuals
Check: number of infectious old individuals
Optional reading

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 20: Part 2 (practical):Changing the expression for


the force of infection
page 51 of 65

prev

next

As we saw earlier , when the population is stratified into just the young and the old, the
expression for the force of infection is given by the following:
y(t) =yyI y(t)+ yoI o(t)

Equation 7

o(t)=oyI y(t)+ oo I o(t)

Equation 8

where
I y (t) is the number of infectious children at time t;
I o(t) is the number of infectious adults at time t;
yy is the rate at which a susceptible child and an infectious child come into effective
contact;
yo is the rate at which a susceptible child and an infectious adult come into effective
contact;
oy is the rate at which a susceptible adult and an infectious child come into effective
contact; and
oo is the rate at which a susceptible adult and an infectious adult come into effective
contact.
3. Return to your Berkeley Madonna model and do the following (in the globals window if
you are using the flowchart model and in the equations window if you are using the
equation editor model):
a) Change the expression for the force of infection among young individuals
to be in terms of b_yy, b_ym, b_yo, Infous_y, Infous_m, Infous_o.

Check

b) Change the expression for the force of infection among middle-aged


individuals to be in terms of b_mm, b_my, b_mo, Infous_y, Infous_m,
Infous_o.

Check

c) Change the expression for the force of infection among old individuals to

be in terms of b_oo, b_oy, b_om, Infous_y, Infous_m, Infous_o.

Check

If you wish to check your equations for the force of infection further, click rubwaifw
flowchart_solna.mmd or rubwaifw equations_solna.mmd , which hold the models
that you should have by now. Note that we are not yet ready to run the model,
as the values for b_yy, b_yo etc are still zero.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 21: Part 2 (practical): Calculating parameters for


different matrix structures
page 52 of 65

prev

next

We will now calculate the parameters for our model. The relationship between the agespecific forces of infection, contact parameters and numbers of infectious cases can be
described with the following equation:

Suppose we assume that contact between individuals in our population is described using
the following matrix:
Matrix A

Q2.4 Using pen and paper, use the values for the numbers of infectious young, middleaged and old individuals that you calculated on page 50 , and the daily force of infection
(see page 49 ), to calculate the values for this matrix.
Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.1: Part 2 (practical): Calculating parameters for different


matrix structures
page 53 of 65

prev

next

5. Incorporate the values for that you have just calculated into the model and save this
model as WAIFWA.mmd. Click on the button below for a hint about how to incorporate the
values (you will get the chance to check your model shortly).
Hint

6. Run the model and look at the figures showing the proportion of individuals that are
susceptible in each age group and the daily number of new infections per 100,000.
Click the button below if you would like to check the output that you should be getting at
this stage.
Show

If your model has failed to run click WAIFWA flowchart_solna.mmd or WAIFWA


equations_solna.mmd to see the model that you should have by now.
Click here to see Table 2, which shows the percentage of the population that is
susceptible and the daily number of new infections per 100,000 that our original model
predicted. You should find that the models predictions of these statistics are very similar to
those found in this table.This is to be expected, given that the parameters in the model
were calculated using the values for the force of infection that are in Table 2.If the
parameters are correctly incorporated into the model, the model should generate
predictions of the force of infection and other statistics that are similar (depending on
rounding) to the values used to calculate the parameters.
At this stage, you may also want to plot the value for the force of infection to check that the
value that the model is predicting is consistent with the value that you used to calculate the
parameters. Click here if you need to remind yourself of how you can do this.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.2: Part 2 (practical): The impact of vaccinating newborns


if individuals contact each other according to WAIFWA
page 54 of 65

prev

next

As we saw in MD04 , if we used the average force of rubella infection for England and
Wales for the 1980s and assumed a life expectancy of 60 years (i.e. identical to that in the
model population), we estimated that R0 was about 7. This value for R0 leads to a to a
herd immunity threshold of 86%. Therefore, in a population in which individuals mix
randomly, we would need to vaccinate over 86% of the population in order to control
transmission.
7. Now run your model assuming 86% of newborns in the population are vaccinated.
Note

At this stage your output should resemble the images shown below. If it does not, click
WAIFWA flowchart_solnb.mmd or WAIFWA equations_solnb.mmd to see
the model that you should have by now.
Proportion susceptible

Daily no. of new infections/100,000

Q2.5 What happens to the age-specific proportions of individuals who are susceptible and

the daily number of new infections per 100,000?


Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.3: Part 2 (practical):Calculating parameters for different


matrix structures
page 55 of 65

prev

next

Alternatively, suppose contact between individuals in our population is described using a


different matrix:
Matrix B

If you wish, calculate the values for this matrix using the same method that you used to
obtain Matrix A, using the numbers of infectious children, middle-aged and old individuals
and age-specific forces of infection. If not, click here for the values.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.4: Part 2 (practical):Comparing predictions obtained using


matrices A and B
page 56 of 65

prev

next

The following figure compares the values for matrices A and B.

Figure 5: Comparison between the values for WAIFWA and WAIFWB.

Q2.6 Which matrix structure is more realistic (WAIFWAorWAIFWB)?


Answer

Before continuing, think about how the impact of vaccinating 86% of individuals in a
population mixing according to matrix B would differ from that predicted for a population
mixing according to matrix A.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.5: Part 2 (practical): Comparing predictions obtained using


matrices A and B
page 57 of 65

prev

next

8. Incorporate the following values for Matrix B into the model and save the model as
WAIFWB. Click here if you would like to remind yourself about the methods for
incorporating parameters.
1 = 1.66 x 10-5 per day
2 = 4.16 x 10-6 per day
3 = 4.16 x 10-6 per day
9. Set the value for prop_vacc to be zero and run the model. Click WAIFWB
flowchart_solna.mmd or WAIFWB equations_solna.mmd if you wish to check
that you have incorporated your values correctly.
Q2.7 How do predictions of the age-specific proportions of individuals who are susceptible
and the daily number of new infections per 100,000 compare against those obtained using
the original model and WAIFWA?
Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

21.6: Part 2 (practical):Comparing predictions obtained using


matrices A and B
page 58 of 65

prev

next

10. Run your WAIFWB model assuming that 86% of the newborns are vaccinated. At this
stage your output should resemble the following. If it does not, click WAIFWB
flowchart_solnb.mmd or WAIFWB equations_solnb.mmd to see the model that
you should have by now.
Proportion susceptible

Daily no. of new infections/100,000

Q2.8 How does vaccination affect predictions of the population susceptible and the daily
number of new infections per 100,000?
Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 22: Conclusions from the practical exercise


page 59 of 65

prev

next

We will now reflect on what this practical exercise tells us about how contact patterns affect
the impact of control strategies. Figure 6 summarises predictions of the effect of
vaccinating 86% of newborns each year from year 100 in the model on the age-specific
proportion of individuals who are susceptible and the daily number of new infections per
100,000, assuming that individuals contact each other according to matrix A or B.
Proportion susceptible

Daily number of new


infections/100,000

Year
Figure 6. Summary of model predictions of the age-specific proportion of individuals who are susceptible and the
daily number of new infections per 100,000, obtained using models WAIFWA and WAIFWB, assuming that 86%
of newborns are vaccinated from year 100. For improved clarity, the lines for the youngest age groups have been
omitted from the plot of the daily number of new infections per 100,000.

Both matrices A and B were calculated using identical values for the force of infection and,
in the absence of vaccination, lead to identical values for the daily number of new
infections per 100,000. However, the impact of vaccination is greater for populations

mixing according to matrix B than matrix A, highlighting that contact strongly determines
the impact of control.
One problem with interpreting these findings is that it is impossible to be sure which
WAIFW matrix best describes the mixing patterns in your population. Several WAIFW
matrices may be able to reproduce the same average force of infection in the absence of
an intervention, but will lead to different predictions of the impact of control.
Consequently, modellers typically use many different assumptions about contact patterns
when using models to predict the impact of an intervention. This situation may change in
future years, as an increasing number of studies (such as the POLYMOD study) try to
collect data on the actual mixing patterns that occur in populations.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

22.1: Conclusions from the practical exercise


page 60 of 65

prev

next

We shall continue thinking about the effect of non-random mixing in MD07 , when we
shall calculate R0 for matrices A and B. We will then identify the actual level of coverage
that would be required to control transmission if individuals were to contact each other
according to these matrices.
Final Optional Exercise
As you shall see in the next session, the values for R0 for populations with mixing patterns
described by WAIFWA and WAIFWB are about 10.9 and 3.6, respectively. Use these
values of R0 to calculate the critical levels of vaccination coverage for these populations.
Check that vaccination at these levels in the model population results in patterns in the
age-specific daily number of new infections per 100,000 that you would expect.
Hint: Remember that the equation for the herd immunity threshold is 1- 1/R0.
Answer

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Section 23: Further reading and exercises


page 61 of 65

prev

next

In this session, we have illustrated how we can use estimates of the force of infection to
estimate contact parameters and have explored how assumptions about contact between
individuals influence predictions of the impact of an intervention.
For further reading and to consolidate your understanding, we recommend that you read
the Chapter 7, sections 7.1-7.4 of the recommended course text 4 .
You should also try the following exercises:
1. Exercises accompanying models 7.1 and 7.2 of the recommended course text 4
(see www.anintroductiontoinfectiousdiseasemodelling.com ).
2. The paper and pen exercises 7.1, 7.2, 7.3 at the end of chapter 7 of the
recommended course text 4 . Solutions are available from the books website.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

23.1: Summary
page 62 of 65

prev

next

We will now summarise the key messages that you should have obtained from this
session.
1. Several studies suggest that contact patterns between individuals are strongly agedependent, and the nature of this age-dependency probably varies between
populations.
2. Contact patterns greatly influence the impact of interventions against infections, and
therefore models need to take account of this if they are to be used to predict the
effect of control.
3. Assumptions of non-random mixing between individuals are incorporated into
models using matrices of "Who Acquires Infection from Whom".

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

23.2: Summary
page 63 of 65

prev

next

4. The steps for calculating a matrix of "Who Acquires Infection From Whom" to
describe transmission between individuals in different age groups, for example
between the young and old (denoted using the subscripts y and o respectively)
for endemic infections are as follows:
a) Calculate the average forces of infection in specific age groups (the young and
old) prior to the introduction of any intervention ( and ).
b) Use the estimates of the force of infection to calculate the numbers of young and
old susceptible individuals, as follows:
S y = proportion of young individuals who are susceptible the
number of young individuals in the population.
S o = proportion of old individuals who are susceptible the number
of old individuals in the population.
S y can be calculated by summing up the number of susceptible individuals of age
a (S(a)) for all values of a between the lowest and maximum limits of the age
range of children. This is equivalent to calculating (or integrating) the area under
the curve of S(a) between the lower and upper limits of the age range of children.
The approach for calculating S o is analogous. See page 40 for references
relating to methods for integration.
c) Use the age group-specific values for the force of infection ( and
respectively), the number of susceptible individuals and the duration of
infectiousness to calculate the average number of infectious individuals in each
age group (I y and I o for the young and old respectively) as follows:

d) Choose an appropriate WAIFW matrix to describe the mixing pattern for the age
groups.
e) Calculate the parameters for the matrix using the estimates of the forces of
infection and the numbers of infectious individuals.

5. The steps described in point 4 can be extended to deal with several different age
groups or to describe transmission between individuals in different settings, e.g.
between individuals living in urban and rural areas.
6. Several different WAIFW matrices can be calculated that are consistent with the agespecific (or group-specific) value for the force of infection before the introduction of
an intervention.
7. Since the effect of an intervention depends on the assumed mixing patterns,
modelling studies typically use several different WAIFW structures when predicting
the impact of control.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

References
page 64 of 65

prev

next

1. Borgdorff MW, Nagelkerke NJ, van Soolingen D, Broekmans JF. Transmission of


tuberculosis between people of different ages in The Netherlands: an analysis using
DNA fingerprinting. Int J Tuberc Lung Dis, 1999. 3(3): p.202-6.
2. Edmunds WJ, Kafatos G, Wallinga J, Mossong JR. Mixing patterns and the spread of
close-contact infectious diseases. Emerg Themes Epidem, 2006. 3(10).
3. Mossong J, Hens N, Jit M, Beutels P, Auranen K, Mikolajczyk R, Massari M,
Salmaso S, Tomba GS, Wallinga J, Heijne J, Sadkowska-Todys M, Rosinska M,
Edmunds WJ. Social contacts and mixing patterns relevant to the spread of
infectious diseases. PLoS Medicine, 2008. 5(3).
4. Vynnycky E, White RG. An introduction to infectious disease modelling. Oxford
University Press, 2010. Oxford
5. Kanaan MN, Farrington CP. Matrix models for childhood infections: a Bayesian
approach with applications to rubella and mumps. Epidemiol Infect, 2005. 133(6):
p.1009-1021.
6. Wallinga J, Teunis P, Kretzschmar M.Using data on social contacts to estimate agespecific transmission parameters for respiratory-spread infectious agents. Am J
Epidemiol. 2006 Nov 15;164(10):936-44.
7. Anderson, R.M. and R.M. May, Infectious diseases of humans. Dynamics and
control. Oxford University Press, 1991, Oxford.

MD06 Methods for incorporating nonrandom (heterogeneous) mixing into


models

EPM302 Modelling and the Dynamics of Infectious Diseases

Home

Contents

Module Map

Glossary

Tools

Help

Appendix: Expressions for the number of young, middle-aged


and old susceptible individuals in the population
page 65 of 65

prev

The number of young, middle-age and older individuals who are susceptible to infection
(S y(t), S m (t) and S o(t) respectively) at a given time t in the population described in the
model satisfy the following differential equations, assuming that no individuals are
vaccinated.

a y is the rate at which young individuals become middle-aged;


a m is the rate at which middle-aged individuals become old;
B is the number of births into the population per unit time;
is the force of infection among the young, middle-aged and old
respectively;
m o is the mortality rate among old individuals.
The long-term (equilibrium) average number of young individuals who are susceptible to
infection is then obtained by equating these differential equations to zero and rearranging
the resulting expressions. This leads to the following equations:

Note that these expressions are specific to the population with the age distribution used in
this model. See Anderson and May (1991) [p178]7 and the recommended course text 4
for expressions for the number of individuals susceptible to infection in a population with

other more realistic mortality patterns.

You might also like