# Control applied to different populations

## Overview

This app lets you explore interventions applied to different population subgroups with potentially different infectiousness and mortality patterns. The app assumes you have worked through The Basics and Reproductive Number sections, as well as the first two apps in the Control section. This app specifically builds on the ID Control for multiple outbreaks app and follows a model and analysis described in (Handel et al. 2020), see the Further Information tab for this and other related references.

### Learning Objectives

- Understand the concept of interventions applied to specific population groups.
- Learn the impact of different interventions on outcomes such as mortality.
- Explore how optimal control measures depend on characteristics and composition of a population.

## The Model

### Model Overview

For this app, we use a version of the basic compartmental SIR-type model. We track the following stages:

- \(S_i\) - uninfected and susceptible individuals
- \(I_i\) - infected and infectious individuals
- \(R_i\) - recovered individuals
- \(D_i\) - dead individuals

Individuals are divided into 3 populations, namely children, adults and elderly (i=c,a,e). Thus, our model with 3 age groups and 4 compartments per age group leads to a 12-compartment model.

For this app, we specify the following processes/flows:

- bij is the rate of transmission to susceptible individuals (Si) from infected individuals (Ij). This leads to the susceptible individual leaving the Si compartment and entering the Ii compartment. Transmission among and between groups can occur at different rates, i.e. all the bij can potentially be different.
- Infected individuals stay infectious for some time, and leave the infected/infectious compartment at rate \(g_i\). A fraction \(m_i\) of those individuals will die and enter the dead compartment, the remaining fraction \(1-m_i\) will enter the recovered compartment.
- Recovered individuals are initially immune to re-infection, but can lose immunity at rate \(w_i\).
- Control measures can be applied to each group at some strength \(f_i\) (between 0 and 1) which reduces the rate at which infections in that group occur. Control measures for each group start at time \(T^i_{start}\) and end at time \(T^i_{end}\).

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

The model equations are given by

\[ \begin{aligned} \dot{S}_c &= - (1 - f_1)(b_{cc} I_c + b_{ca} I_a + b_{ce} I_e) S_c + w_c R_c\\ \dot{I}_c &= (1 - f_1)(b_{cc} I_c + b_{ca} I_a + b_{ce} I_e) S_c - g_c I_c\\ \dot{R}_c &= (1-m_c) g_c I_c - w_c R_c\\ \dot{D}_c &= m_c g_c I_c\\ \dot{S}_a &= - (1 - f_2)(b_{ac} I_c + b_{aa} I_a + b_{ae} I_e) S_a + w_a R_a\\ \dot{I}_a &= (1 - f_2)(b_{ac} I_c + b_{aa} I_a + b_{ae} I_e) S_a - g_a I_a\\ \dot{R}_a &= (1-m_a) g_a I_a - w_a R_a\\ \dot{D}_a &= m_a g_a I_a\\ \dot{S}_e &= - (1 - f_3)(b_{ec} I_c + b_{ea} I_a + b_{ee} I_e) S_e + w_e R_e\\ \dot{I}_e &= (1 - f_3)(b_{ec} I_c + b_{ea} I_a + b_{ee} I_e) S_e - g_e I_e\\ \dot{R}_e &= (1-m_e) g_e I_e - w_e R_e\\ \dot{D}_e &= m_e g_e I_e \end{aligned} \]

with control fi being only non-zero between times \(T^i_{start}\) and \(T^i_{end}\).

Note that we’ll be exploring multi-outbreak scenarios with this app, similar to the ID control for multiple outbreaks app. Instead of setting infected to zero once they drop below 1, and introducing new infected at certain times, we simply do not set infected to zero, which means they might approach very low, but never fully zero values. Having fractions of infected individuals is of course not quite realistic, but it works for our purpose here and the overall patterns would be the same if we implemented it more realistically (e.g. a stochastic model with regular new introductions of infected).

### Notation Comment

It might be worth saying something about the transmission terms. I generally use a single subscript to describe transmission from a group, e.g. bA for transmission/infectiousness of asymptomatic. If there are multiple groups that can be susceptible and infectious, a common notation is to start with the receiving group first, then the sending/transmitting group, e.g. if susceptible adults (A) are infected by children (C), most authors write bAC. I follow this convention. Note however that it is equally ok to use bAC to mean that infected adults transmit to susceptible children. I actually like this sender first perspective better, and used it originally, but switched to stick with the convention used in the main introductory textbooks on this topic.

In general you need to read papers/model descriptions carefully, and hopefully the authors do a good job explaining exactly what is meant. Such that there is no confusion. Just read carefully every time and don’t jump to conclusions based on what you have seen before or what you think it means.

## What to do

In the following, we explore a few simple hypothetical interventions for different scenarios and assess their effects. We are thinking of a pathogen like SARS-CoV-2/COVID-19, but the overall findings are general and can apply to other pathogens as well.

The tasks below are described in a way that assumes everything is in units of days (rate parameters, therefore, have units of inverse days).

### Task 1

We start by assuming a population of 1000 individuals, with 20% children, 25% elderly and the remainder middle-aged adults. Set the values for Sc, Sa and Se to reflect these assumptions. Start with one infected adult, no infected in the other groups. We make the assumption that infection lasts around 10 days in each age group. This means setting the rates gi=0.1.

If one wanted to run a model for research or policy purposes, one would want to choose transmission rates within and between groups to approximate reality. These transmission rates depend on the pathogen. For respiratory infections, the POLYMOD data is often used (see Further Resources for references). We keep it simple here and assume that rates of transmission within groups is larger than between groups, but that otherwise all groups have the same rates. We’ll set bcc = baa = bee = 0.0003 (within-group transmission) and all other transmission rates to 0.0001.

To obtain age-related mortality that mimic COVID-19, we assume mortality among infected to be 0.1%, 1% and 10% for children, adults and elderly respectively. Set the parameters \(m_i\) accordingly. Turn off waning immunity for now. Run the simulation without any control applied, i.e. f1 = f2 = f3 = 0 (thus the start and end times for the control do not matter). Run the simulation for 600 days.

You should see an outbreak with remaining susceptibles in the children/adult/elderly categories of around 75/110/87. Note that for the number of dead children, you get a value below 1. This doesn’t make much sense, however, we are running it for a popualtion of 1000 (so we can see the plots well), so interpret this as number per thousand, which can be less than 1. Also compare the final number of recovered to dead and make sure it’s approximately the ratio you would expect based on the mortalities for the different age groups.

Record

- Total dead children at end of simulation

- Total dead adults at end of simulation

- Total dead elderly at end of simulation

### Task 2

Now lets implement strong control for each age group by setting f1 = f2 = f3 = 0.9. Assume that each control starts 50 days after outbreak start and lasts for 100 days. Keep all other values as previously. Run the simulation. You should see that the strong control initially pushes infected down, but once control is stopped, the outbreak rebounds and the overall size of the outbreak is similar to that without control and the number dead at the end of the simulation are only slightly lower.

Record

- Total dead children at end of simulation

- Total dead adults at end of simulation

- Total dead elderly at end of simulation

### Task 3

Recall from the multi-outbreak app, the best one can do in a multiple outbreak scenario is to get as close to population immunity as possible without much overshoot, thus preventing further outbreaks. To achieve this, less strong control can be better. We can revisit that idea here. Reduce control strength to 0.4 for each group, leave everything else the same. Record the total dead in the 3 age groups and compare to the ones you got for stronger control. The absolute numbers are small, but convince yourself that the relative change is quite large.

Record

- Total dead children at end of simulation

- Total dead adults at end of simulation

- Total dead elderly at end of simulation

### Task 4

Now lets explore the idea that control that has a similar impact on number infected can differ in its impact on the number who are dying. This can happen if mortality differs between groups. We’ll first target the elderly with some control measures. Set f1=0, f2=0.0 and f3=1. Assume that control starts 50 days after outbreak start and lasts for 100 days. Keep all other values as previously. Run the simulation.

Record

- Total number susceptible (add all 3 groups) at end of simulation

- Total number dead (add all 3 groups) at end of simulation

### Task 5

Now we’ll implement control that targets adults. This can be achieved by setting f1=0, f2=0.52 and f3=0. The control strength is chosen to ensure the overall control impact is comparable. Keep all other values as previously. Run the simulation. As you compare these 3 control scenarios, you should find that the total number of susceptible left at the end of the outbreak is the same, however the number dead changes in a likely expected way: Control applied to groups with higher mortality leads to an increased reduction in deaths.

Record

- Total number susceptible (add all 3 groups) at end of simulation

- Total number dead (add all 3 groups) at end of simulation

### Task 6

Now we apply control that focuses on children. Because the population sizes are different, we also need to apply some control to the adults, which is tweaked to get an overall similar strength of control compared to the previous task. This can be achieved by setting f1=1, f2=0.113 and f3=0. Assume that control starts 50 days after outbreak start and lasts for 100 days. Keep all other values as previously. Run the simulation.

Record

- Total number susceptible (add all 3 groups) at end of simulation

- Total number dead (add all 3 groups) at end of simulation

## 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_idcontrolmultigroup_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.
- This app closely follows a model and analysis described in (Handel et al. 2020).
- The POLYMOD mixing data is described in (Mossong et al. 2008). Similar studies have since provided additional data, e.g. (Zhang et al. 2020; Klepac et al. 2020).

### References

Handel, Andreas, Joel Miller, Yang Ge, and Isaac Chun-Hai Fung. 2020. “If Long-Term Suppression Is Not Possible, How Do We Minimize Mortality for COVID-19 and Other Emerging Infectious Disease Outbreaks?” medRxiv, April, 2020.03.13.20034892. https://doi.org/10.1101/2020.03.13.20034892.
Klepac, Petra, Adam J Kucharski, Andrew JK Conlan, Stephen Kissler, Maria Tang, Hannah Fry, and Julia R Gog. 2020. “Contacts in Context: Large-Scale Setting-Specific Social Mixing Matrices from the BBC Pandemic Project.” medRxiv. https://doi.org/10.1101/2020.02.16.20023754.
Mossong, Joël, Niel Hens, Mark Jit, Philippe Beutels, Kari Auranen, Rafael Mikolajczyk, Marco Massari, et al. 2008. “Social Contacts and Mixing Patterns Relevant to the Spread of Infectious Diseases.” PLoS Medicine 5 (3): e74.
Zhang, Juanjuan, Maria Litvinova, Yuxia Liang, Yan Wang, Wei Wang, Shanlu Zhao, Qianhui Wu, et al. 2020. “Changes in Contact Patterns Shape the Dynamics of the COVID-19 Outbreak in China.” Science 368 (6498): 1481–86. https://doi.org/10.1126/science.abb8001.