This app is meant to teach you about the basic concepts behind the reproductive number. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.
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, some processes increase the number of individuals in a given compartment/stage and other processes that lead to a reduction. Those processes are sometimes called inflows and outflows.
For our system, we specify the following processes/flows:
The flow diagram and the set of equations which are used are the basic SIR model and are shown again:
Flow diagram for simple SIR model.
Model equations:
\[\dot S = - b SI \] \[\dot I = b S I - g I \] \[\dot R = g I \]
The app and tasks deal with the reproductive number concept. The following section provides a very brief introduction. I recommend reading a bit more about it. I’m following the terminology of my own write-up. You can also check the books listed in the ID introduction app or some of the papers listed in the Further Resources section of this app.
The reproductive number is defined as the average number of new infected (and infectious) individuals caused by one infectious individual. The basic reproductive number is the reproductive number in a scenario where everyone is susceptible. For the SIR model shown above, this quantity is \[R_0=\frac{bS_0}{g}\] where S0 is the initial number of susceptibles. For a single outbreak (no births, natural death or waning immunity) and a basic SIR model, an equation linking the number of susceptibles left at the end and the basic reproductive number is \[R_0=\frac{\ln(S_f)}{(S_f - 1)}\] where \(\ln()\) is the natural logarithm and Sf is the fraction of susceptibles still left.
Note the unfortunate fact that the letter R is used both for the recovered compartment in the model and the reproductive number. This is standard notation and I’ll therefore use it here. Just be careful to figure out from the context if someone is talking about the recovered individuals or the reproductive number.
The tasks below are described in a way that assumes everything is in units of months (rate parameters, therefore, have units of inverse months). If any quantity is not given in those units, you need to convert it first (e.g. if it says a year, you need to convert it to 12 months).
simulate_sir_ode
. You can call them directly, without going through the shiny app. Use the help()
command for more information on how to use the functions directly. If you go that route, you need to use the results returned from this function and produce useful output (such as a plot) yourself.vignette('DSAIDE')
into the R console.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. https://doi.org/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. https://doi.org/10.1098/rsif.2005.0042.
Keeling, Matt J, and Pejman Rohani. 2008. Modeling Infectious Diseases in Humans and Animals. Princeton University Press.
Roberts, M G. 2007. “The Pluses and Minuses of R0.” Journal of the Royal Society, Interface 4 (16): 949–61. https://doi.org/10.1098/rsif.2007.1031.
Vynnycky, Emilia, and Richard White. 2010. An Introduction to Infectious Disease Modelling. Oxford University Press.
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.