This app covers more aspects of the reproductive number concept. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab. If you are not familiar with the reproductive number, you should go through the ‘Reproductive Number 1’ app first.
This app also assumes that you have worked through the apps in the The Basics section.
For this app, we’ll use a basic compartmental SIR model that also includes births, deaths and waning immunity. 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 to implement this model are as follows:
Model Diagram
\[\dot S =n - b SI - mS + wR\] \[\dot I = b S I - g I - mI\] \[\dot R = g I - mR - wR\]
The app and tasks deal with the reproductive number concept. 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.
In the Reproductive Number 1 app, we looked at how one can write down and equation for the reproductive number for the model used there. The model we use here is similar but not quite the same. We can use the basic definition to easily figure out the reproductive number. Recall that it is defined as the average number of new infected (and infectious) individuals caused by one infectious individual.
For the model shown above, one can figure the value out by determining how many new infections are caused by one infected person. A person is infectious for a duration of 1/(g+m), the inverse of all the outflows out of the compartment. During that time they infect others at rate b. Thus the average number of new infections during created in b/(g+m). For the whole population, assuming initially everyone is susceptible, we multiply by the number of initial susceptibles to get \[R_0=\frac{bS_0}{g+m}\]
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).
In Reproductive Number 1, the focus was on a single outbreak. But the reproductive number concept is also useful in situations where a disease is endemic. As you learned in the Patterns of ID app (if not, go do it before this one), to achieve an endemic state, we need replenishment of susceptibles through for instance births or waning immunity. We’ll start with natural births and deaths. If births (and deaths) are present, you will be able to get multiple outbreaks and endemic states. Set the parameter values such that your hosts have approximately an average lifespan of 41 years (remember to convert to months before taking the inverse). Round to the first significant digit (i.e. 0.00X). Set birth rate such that the population is steady at 1000 in the absence of any infected hosts (if you need a reminder how that’s done, revisit the ID Patterns app).
Now we’ll introduce the disease. Set simulation time to around 500 years, 1 infected, g=5, b=0.015. Run the simulation, make sure you reach a steady state. Compare the steady state values for S (and optional I and R) from the simulation with those predicted from the SIR steady state equations (see Patterns of ID app).
Record
The value you used for birth rate
Number susceptible at steady state
Figure out what the value for the reproductive number is at the endemic steady state. To that end, recall its definition (average number of new infectious persons created by one infectious person) and determine what has to be true if the number of infected neither increases nor decreases. How does that compare to the reproductive number at the peak of an outbreak, which you learned about before?
Record
At steady state, you have the R value you just figured out in the previous task and a fraction of the population is susceptible, namely Sf / S0 where Sf is the number of susceptibles at steady state and S0 is the number of susceptibles at the beginning. You learned that the equation for the reproductive number for this model is R0=bS0/(g+m). Use it to compute the reproductive number. Compare the value of R0 at the start (where the fraction of susceptible is 1) with the value of the fraction of susceptible and the R value at steady state. Can you figure out how they relate? It should confirm what you figured out about R at steady state in the previous task.
Record
Number susceptible left at steady state
The value for R0
Next double the values for both natural birth and death rates. What do you get for the value of S at steady state? Is that surprising? If it is, take another look at the relation between R0 and S at steady state, and the equation for R0.
Record
Record
Number susceptible at steady state (A)
Number susceptible at steady state (B)
One usually obtains R0 from the data/literature and uses it to pick values for the transmission parameter, b, which is otherwise very hard to estimate. Let’s try that. Go online and find (approximate) values for the duration of the infectious period and R0 for SARS. Start with 1000 susceptible, 1 infected. Assume that for a single outbreak we can ignore births, deaths or waning immunity (all zer0). Use those values and the R0 equation to compute the transmission parameter, b. Then run a simulation with that value for b (for 12 months). Recall from the Reproductive Number 1 app how you can use the fraction if suceptibles left at the end of an outbreak to compute R0. Do that here again to confirm that you get indeed (approximately) the value you started out with.
Record
Let’s repeat the same for a disease that causes an endemic state, tuberculosis (TB). Go online and find estimates for the basic reproductive number of TB. Note that TB is somewhat special: An infected and infectious person (someone with TB disease) might infect many others, but only some of those will go on to develop disease and become infectious. For R0, we always need to go from infectious individual to another infectious individual. Also find an estimate for the duration of the infectious period for TB. Then use these quantities to determine parameters b and g and run a simulation with 1000 susceptible and the same birth and death rates as in task 1 (m=0.002 and n=2). Check that the steady state levels of infected/infectious individuals matches with the R0 value you chose.
Note: The SIR model is not a good model for TB since for TB, the stage where individuals are infected but not yet infectious is long and important. So to really model TB, one would need to include such details. We are only using TB here for illustrative purposes.
Record
simulate_SIRSd_model_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.