# ID Control 1 - Practice

## Overview

This app links the reproductive number and ID control. Read about the model in the “Model” tab. Then do the tasks described in the “What to do” tab. Before going through this app, you should go through the ‘Reproductive Number’ apps first.

This app assumes that you have worked through the reproductive number apps.

### Learning Objectives

- Know how to the reproductive number informs control.
- Know how different control measures impact the reproductive number.

## The Model

### Model Overview

For this app, we’ll use the same basic compartmental SIR model as for the ‘Reproductive Number 2’ app. We allow for 3 different stages/compartments:

- S - uninfected and susceptible individuals
- I - infected and infectious individuals (note that these terms are often used interchangeably, but technically we are talking about someone who is infected and is infectious, i.e. can infect others)
- R - recovered/removed individuals. Those are individuals that do not further participate, either because they are now immune or because they died.

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:

- Susceptible individuals (S) can become infected by infectious individuals (I) at some rate, b. This leads to the susceptible individual leaving the S compartment and entering the I compartment.
- Infected individuals recover and enter the recovered (R) compartment at some rate, g.
- Recovered individuals can lose immunity at rate w and return to the susceptible compartment.
- Natural births (into the S compartment at rate n) and deaths (from all compartments at rate m) are possible.
- The model allows a fraction of individuals to be vaccinated before the outbreak. Those individuals are moved into the R compartment before the start of the outbreak.

### Model Implementation

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

Flow diagram for this model.

\[\dot S =n - b SI - mS + wR\] \[\dot I = b S I - g I - mI\] \[\dot R = g I - mR - wR\] \[S_{v} = (1-ef)S(0)\] \[R(0) = efS(0)\]

### Vaccination Implementation

The model includes the process of vaccinating individuals. It is modeled in a fairly simple way. Before the simulation starts, it is assumed that a fraction f of susceptibles are vaccinated. The vaccine protects those vaccinated with efficacy e. Those protected individuals move into the R compartment, the remainder stay in S. Thus, the simulation is started with values for susceptibles and recovered following vaccination given by \(S_{v} = (1 - fe) S\) and \(R = feS\). As an example, for a perfect vaccine (\(e=1\)) given to half the population (\(f=0.5\)) the initial number of susceptibles is reduced by half.

Note the unfortunate fact that the recovered compartment uses the same letter as the reproductive number, and the starting value for the R compartment, R(0) looks similar to the basic reproductive number. This is common notation and I therefore use it here too. Just be careful to make sure you know which quantity is discussed.

## What to do

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).

### Task 1

Knowing the reproductive number, R, is important for control strategies, e.g. for vaccine campaigns. You learned in the reproductive number apps that for R=1 an outbreak switches from growth to decline (often called the threshold value). Let’s say you have an ID that enters a new population where everyone is susceptible. That ID has R0=4. Would you expect to see an outbreak? Why? Now let’s assume that we protected half the population through a (100% effective) vaccine. What is the new value for R, i.e. how many people are being infected on average by an infected person after we vaccinated? Is that new value of R low enough to prevent the outbreak? What is the minimum percentage of the population you would need to be able to protect/vaccinate to achieve an R such that no outbreak can occur?

Record

- The new value for R

- The percentage needed to vaccinate/protect to prevent an outbreak

### Task 2

Let’s test the vaccination idea with the computer simulation. Set the simulation with 1000 susceptibles and 1 infected, simulation time 24 months, g=5, no births, deaths or waning immunity. Choose the value for b such that R0=4. Run the simulation for 0% vaccination coverage to confirm things happen as you expect. Use the final size equation for R0 to make sure it gives you a value of approximately 4.

Record

- value for parameter b to get R=4

- Number of susceptible at end of simulation

### Task 3

Now set 50% vaccination coverage at 100% vaccine efficacy (f=0.5 and e=1). This changes the effective number of susceptible, as described in the Model section. What is the value of the effective R after vaccination? Run a simulation, use final size equation to confirm the expected R value.

Record

- The new value for R

- Number of susceptible at end of simulation

### Task 4

Now run the simulation at the vaccination level you determined above to be enough to prevent an outbreak. Make sure the simulation results and your theoretical reasoning agree.

Record

- Nothing

### Task 5

Most vaccines are not perfect. For the model settings above (R=4), what percentage of the population would you need to vaccinate to prevent an outbreak if the vaccine efficacy/effectiveness was 75% (e=0.75)? Confirm with the simulation. What happens to your ability to prevent an outbreak if the vaccine efficacy was was 65% or less?

Record

- The percentage vaccinated needed to prevent an outbreak for e=0.75

### Task 6

Other useful interventions are quarantine or isolation, types of social distancing. Isolation is usually the term applied to reduction of contacts of an infected/infectious individual, quarantine to possibly exposed but likely still susceptible individuals (though that terminololgy can vary). In our model, we can’t distinguish between interventions that target susceptibles or infected, both could reduce the transmission rate. Targeting susceptibles before they become infected is of course preferable, but there are usually many more of those, so targeting infected is often easier. Interventions that reduce contact and transmission/infection risk for both groups are of course best. Consider the scenario as in task 2, but now with b=0.015. If we were able to reduce contacts and thus transmission by half, what would R0 be (and would that prevent an outbreak)? Test with the simulation.

Record

- Value of R0 if transmission is reduced by half

### Task 7

If we want to completely prevent an outbreak, what value do we need to reduce R0 to? To achieve this, by what percentage do we need to reduce transmission? Express this reduction as a percent of the original value (e.g. reducing transmission from 0.1 to 0.06 is a (0.1-0.06)/0.1*100 = 40% reduction). Confirm with the model.

Record

- Percentage by which transmission needs to be reduced

### Task 8

Keep exploring. The model allows for births and deaths and waning immunity. We haven’t explored that here, but you might want to. One limitation of the model is that it only allows vaccination at the start of the simulation, so any births will always be un-vaccinated. If one wanted a more realistic model, e.g. one that can mimick vaccination of children, one would want to modify the model to allow ongoing vaccination of a fraction of those entering the susceptible compartment.

Record

- Nothing

## Further Information

- This app (and all others) are structured such that the Shiny part (the graphical interface you see and the server-side function that goes with it) calls an underlying R script (or several) which runs the simulation for the model of interest and returns the results.
- For this app, the underlying function(s) running the simulation are called `simulate_idvaccine_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.
- You can also download all simulator functions and modify them for your own purposes. Of course to modify these functions, you’ll need to do some coding.
- For examples on using the simulators directly and how to modify them, read the package vignette by typing `vignette('DSAIDE')` into the R console.
- For the equations mentioned in the tasks, see e.g. (Heffernan, Smith, and Wahl 2005; Keeling and Rohani 2007; Vynnycky and White 2010).
- For some information on the reproductive number, see e.g. (Fine, Eames, and Heymann 2011; Heffernan, Smith, and Wahl 2005; Roberts 2007; Wallinga and Lipsitch 2007).

### 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. 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 / the Royal Society 2 (4): 281–93. https://doi.org/10.1098/rsif.2005.0042.
Keeling, Matt, and Pejman Rohani. 2007. 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. Biological Sciences / The Royal Society 274 (1609): 599–604. https://www.ncbi.nlm.nih.gov/pubmed/17476782.