This app allows you to explore a model with 2 different modes of direct transmission. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab.
This is a simple SIR model with births and deaths and 2 types of direct transmission, density-dependent and frequency-dependent (based on the terminology in (Begon et al. 2002) - see Further Information tab for references).
This model has the following compartments:
The processes being modeled are:
The force of infection, denoted by f here, depends on the transmission model. For density-dependent transmission, it is given by f = bd I / A, where A is the area of the scenario under consideration (e.g. a city). For frequency-dependent transmission, we have f = bf I / N, where N is the size of the population, N=S+I+R.
The flow diagram and the set of ordinary differential equations (ODE) which are used to implement this model are as follows:
Model Diagram
\[\dot S =n - f S + wR - mS\] \[\dot I = f S - g I - mI\] \[\dot R = g I - wR - mR\]
with f = bd I / A for density-dependent transmission and f = bf I / N for frequency-dependent transmission.
Note that quite often, we assume that the area is constant and do not include it in the model or even talk about it. Often, the population size is also assumed to be constant. In that case, the 2 types of transmission models behave the same. But as soon as area or population size change, the model results differ. This is the topic covered here.
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).
Run the simulation with 999 susceptible individuals and 1 initially infected host. Set the simulation duration to 10 years. Consider density-dependent transmission, with a transmission rate of bd = 0.005, and an area of size 2. Assume that the duration of the infectious period is 15 days long (and that there are 30 days in a month). Turn off births, deaths and waning immunity for now. If you did it correctly, your outbreak should end with around 626 susceptible individuals still remaining. Take a look at the force of infection (FOI) equation for density-dependent transmission. The FOI value changes throughout the outbreak because it has I in the equation. But the other parts of the equation remain constant. Compute the FOI value for the settings here at the start of the outbreak (where I=1).
Record
Force of infection at start
FRACTION of susceptible (Sfinal/Sinitial) at end of simulation
Now switch the scenario to frequency-dependent from density-dependent transmission. Set bf = 2.5. The value of bd does not matter since only one type of transmission is turned on at any time. Leave all other settings as before. Before you run the simulation, compute the force of infection for frequency-dependent transmission for the chosen parameter values. Compare to the value from the previous task. Based on that, what do you expect to get for the outbreak? Run the simulation to confirm your expectation.
Record
Force of infection at start
FRACTION of susceptible at end of simulation
Let’s assume we are now in a location with twice the number of people as before (S0 = 1999), living in the same area. All other quantities (rate of transmission, recovery time, etc.) are assumed to be the same. Take a look at the FOI equation for density-dependent transmission. Based on its value for this new scenario, how do you expect the outbreak to change if transmission is density-dependent? Note that you will need to consider not only the FOI at the start (with I=1), but also how I, and thus the FOI, change over the course of the outbreak, and how this is impacted by a change in population size. Run the simulation to check your expectations.
Record
Force of infection at start
FRACTION of susceptible at end of simulation
Repeat what you did for the previous task, now assuming that transmission is frequency-dependent.
Record
Force of infection at start
FRACTION of susceptible at end of simulation
If you double the population size as you just did, how do you need to adjust the area to obtain an outbreak of the same relative size (same fraction that become infected/remain susceptible) for density-dependent transmission? Try with the simulation and see if your expectation is correct.
Record
Keep exploring by trying different parameters and transmission settings and see how they influence results. You can also go beyond a single outbreak and turn on births/deaths (which can impact population size) or waning immunity. As you continue your exploration, think about real infectious diseases that might be approximated by either one of the transmission types, and what approximate choices for the model parameters would describe those IDs.
Record
simulate_directtransmission_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.