DSAIDE - Dynamical Systems Approach to Infectious Disease Epidemiology

A collection of Shiny/R Apps to explore and simulate the population dynamics of infectious diseases.
Written and maintained by Andreas Handel, with contributions from others.

Reproductive Number - Practice

Overview

This app lets you explore the reproductive number in some detail. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.

The Model

Model Overview

For this app, we’ll use the basic compartmental SIR model. We allow for 3 different stages/compartments:

In addition to specifying the compartments of a model, we need to specify the dynamics determining the changes for each compartment. Broadly speaking, there are processes that increase the number of individuals in a given compartment/stage, and processes that lead to a reduction. Those processes are sometimes called in-flows and out-flows.

For our system, we specify the following processes/flows:

Model Implementation

The flow diagram and the set of equations which are used to implement this model are as follows:

Model Figure

Model Figure

\[S_{v} = (1-ef)S_0\] \[R_0 = efS_{v}\] \[\dot S =\lambda -\beta SI - nS + wR\] \[\dot I = \beta S I - \gamma I - nI\] \[\dot R = \gamma I - nR - wR\]

Here, \(S_0\) is the initial population of susceptibles, and \(S_{v}\) is the susceptible population after vaccination. Vaccinated individuals are moved to the \(R\) compartment prior to the start of the outbreak.

What to do

The following tasks ask you to use various equations to compute the reproductive number. If you are not familiar with those, you need to do some background reading, e.g. the books listed in the ID introduction app or some of the papers listed in the Further Resources section of this app.

Task 1:

Task 2:

Task 3:

Task 4:

Task 5:

Task 6:

Task 7:

Task 8:

Task 9:

Task 10:

Task 11:

Task 12:

Task 13:

Task 14:

Task 15:

Task 16:

Answers

They are currently not shown anywhere. The answers below are also not updated and are likely not in sync with the questions/tasks above.

Those answers correspond to an old set of tasks and might not be up-to-date!

Answer 1:

Fraction of susceptibles left at end of outbreak are about Sf=0.2, which leads to an R0=log(Sf)/(Sf-1)=2, same (up to some rounding errors) one gets from the R0=beta*S0/gamma equation.

Answer 2:

Double beta gives double R0, bigger outbreak.

Answer 3:

Double rate of recovery brings R0 back down. Faster recovery means fewer chances for an infected to infect other, therefore lower R0.

Answer 4:

Growth rate can be read off from values of I(t) and given as r=(log(It2)-log(It1))/(t2-t1), where It1 and It2 are number of infected at times t2 and t1.

Answer 5:

The peak is when the outbreak goes from growth (R>1) to decline (R<1), just at the peak we have R=1. At the peak, there is no growth, so r=0, and the equation R=1+rD becomes R=1+0D=1. To prevent any further infections (not only have the outbreak wane, but stop instantaneously) would require an R=0.

Answer 6:

R0=1 means no outbreak, we need R0>1 for an outbreak. If R0 is only slightly above 1, you can see a very slow and small outbreak.

Answer 7:

In the model, we describe births and deaths by a constant birth rate lambda and a per-capita death rate \(\mu=1/Y\), where Y is the average lifespan. To get a steady state in the absence of the disease, we need births and deaths to balance each other, i.e. \(\lambda=\mu*S\), or \(S=\lambda/ \mu= \lambda*Y\). In the simulation, no matter what number of susceptibles you start with, they will eventually settle down at a level given by lambda/mu.

Answer 8:

At steady state, we have no changes in the sizes of the S, I, R compartments. Therefore our equations become 0=lambda-muS-betaSI, 0=betaSI-gammaI-muI, 0=gammaI-muR. Those equations can be solved for the steady state values Ss, Is and Rs as functions of the model parameters. One finds Ss=(gamma+mu)/beta, Is= lambda/(gamma+mu)- mu/beta, Rs=gamma/muIs . For given choices of the parameters, one can compute the values for these steady states. They agree with the values one gets from the simulation at steady state.

Answer 9:

R0=1/Ss=1/(0.5)=2, as expected. Double gamma gives R0=1, no SS with disease. Changes in birth and death don’t make a difference.

Answer 10:

Same R0, so outbreak size is the same (same total number of people become infected), but the dynamics is different. With a longer infectious duration and a lower level of infectiousness, we get a slower outbreak. Could for instance be SARS versus HIV: Similar R0, but SARS is shorter and more infectious, HIV longer and less infectious.

Answer 11:

Estimates for R0 for SARS are around 3-5. If you have R0, you can use the equation for R0, solve for beta to get beta=R0*gamma/S0. So if you know R0, duration of infectious period and size of your population, you can get the rate of transmission.

Answer 12:

R=4 is >1 so we get an outbreak. If we protected half the population, we would cut down R=R0(1-p)=4(1-0.5)=2. Would still give an outbreak, though a smaller one. We need to get R<=1 to not get an outbreak. For that, we need to protect 75% (or a bit more) of the population to get R=4*(1-0.75)=1.

Answer 13:

As it should be, simulations agree with theory (up to small rounding/numerical differences).

Further Information

References

Fine, Paul, Ken Eames, and David L Heymann. 2011. “‘Herd Immunity’: A Rough Guide.” Clinical Infectious Diseases : An Official Publication of the Infectious Diseases Society of America 52 (7): 911–16. doi:10.1093/cid/cir007.

Heffernan, J M, R J Smith, and L M Wahl. 2005. “Perspectives on the Basic Reproductive Ratio.” Journal of the Royal Society, Interface 2 (4): 281–93. doi:10.1098/rsif.2005.0042.

Roberts, M G. 2007. “The Pluses and Minuses of R0.” Journal of the Royal Society, Interface 4 (16): 949–61. doi:10.1098/rsif.2007.1031.

Wallinga, J., and M. Lipsitch. 2007. “How generation intervals shape the relationship between growth rates and reproductive numbers.” Proceedings of the Royal Society B 274 (1609): 599–604.


This package is built and maintained by Andreas Handel, with contributions from others.
All text and figures are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Software/Code is licensed under GPL-3.