## What to do

The following tasks ask you to use various equations to compute the reproductive number. If you are not familiar with those, you need to do some background reading, e.g. the books listed in the ID introduction app or some of the papers listed in the Further Resources section of this app.

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:

- Set the simulation with a total population size of 1000, 999 susceptibles and 1 infected.
- Simulation time 60 months, g=5, b=0.01. Everything else at 0.
- Run the simulation, you should get an outbreak.
- Use the final size equation linking R0 and the fraction of susceptible hosts left at the end of the outbreak to compute the reproductive number.

### Task 2:

- Use the equation that expresses R0 as a function of model parameters for the simple SIR model. Using the values of the model parameters, compute R0 that way. Check that it agrees with what you found in task #1.

### Task 3:

- Double the value of the transmission parameter, b. Leave everything else as before.
- Before you run the simulation, what do you expect to see and what do you expect to get for R0?
- Run the simulation and compute R0 using the final outbreak size to test your expectations.

### Task 4:

- Next, double the rate of the recovery parameter, g. Leave everything else unchanged.
- Think about your expectations for R0 and the dynamics.
- Run the simulation to check your expectations. Use the final outbreak size to compute R0.

### Task 5:

- Set the model parameters back to those given in task #1.
- Another way to estimate R0 is to determine the rate of increase in infected hosts at the beginning of the outbreak. During the initial phase, new infections increase exponentially according to I(t)=I0 exp(rt), with r being the rate of growth. Usually, for any real outbreak, you do not know the number of infected at the start, I0, or the exact time the outbreak starts. It is still possible to estimate r by obtaining two values of I at two time points during that initial growth rate, i.e. I1 at time t1 and I2 at time t2. With those quantities, one can compute the exponential growth rate, r. Figure out how to determine those values and use them to compute r. Hint: play with the maximum simulation duration such that the simulation stops at 2 different times during the initial exponential growth phase.
- For this model, the growth rate and R0 are related through R0 = 1+rD, where D is the average duration of the infectious period (i.e. the inverse of the recovery rate). Use this to determine R0. You should get essentially the same answer (up to some rounding differences) as for task #1.
- Note that the choice of t1 and t2 can influence the results. Earlier times are better since once the number of susceptibles starts to drop markedly, the growth of infected slows down and is not exponential anymore.

### Task 6:

- What is the value of R at the time the outbreak peaks? (It’s only called R0 at the beginning for a fully susceptible population). Explain how you can find that value for R, both using intuitive reasoning and using the equation for R0 given above (R0 = 1+rD). Note that at this R value, the outbreak wanes, but people still get infected. What R value would you need to halt any further infections completely?

### Task 7:

- What would happen if a new ID came along that had an R0 value that was the same as the one you just determined in the previous question, namely the value of R at the peak of an outbreak? Test this with the simulation. Choose parameter values for which you get the right R0 and observe what the model produces.

### Task 8:

- R0 quantifies the level of transmissibility of an ID, which determines how many people will become infected or what level of intervention is needed to stop/prevent an outbreak. However, it is important to be aware that R0 says nothing about the timing/dynamics of the outbreak. Set parameter values as in #1. Run an outbreak, record the time of peak and duration of the outbreak (the latter is somewhat ill-defined, so just come up with a rough number). Then increase the infectious duration by a factor of 4 (rate reduced by a factor of 4) and adjust the infectiousness-level such that you get the same R0 as before. Run again and compare the results concerning total outbreak size and timing of outbreak.

### Task 9:

- One usually obtains R0 from the data/literature and uses it to pick values for the transmission parameter. Let’s try that. Go online and find (approximate) values for the duration of the infectious period and R0 for SARS. Keep the population size at 1000. Use those values to compute the transmission parameter, b. Run an outbreak, see if things work out right. Specifically, using the equation involving the final number of susceptibles left should give you an R0 that roughly agrees with the one you started out with.

### Task 10:

- Knowing R is important for control strategies, e.g. for vaccine campaigns. You learned at what value of R an outbreak switches from growth to decline (often called the threshold value) and that for this R value, outbreaks don’t take off. 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? How low does R need to be to prevent an outbreak? What fraction of the population would you need to protect/vaccinate to achieve such an R?

### Task 11:

- Let’s test the vaccination idea with the computer simulation. Set model parameters such that you get an R0=4.
- Run the simulation for 0% vaccination coverage to confirm things happen as you expect. Check if the final size of the susceptible/infected population is what it should be and returns (approximately) an R0=4 when you use the final size equation to compute it.
- Now repeat for 50% vaccination coverage at 100% vaccine efficacy. What is the value of the effective R after vaccination? Run a simulation and check to make sure that is what you get.
- Finally, run the simulation at the vaccination level you determined above to be enough to prevent an outbreak. Make sure your expectations and simulation results agree.

### Task 12:

- Most vaccines are not perfect. What fraction of the population would you need to vaccinate for the scenario above if the vaccine efficacy/effectiveness was 75%? What if it was 60%? Confirm with the simulations.

### Task 13:

- So far, we looked at an individual outbreak. Now we introduce births and deaths. For our model, we use a constant birth rate m and a fixed per-capita death rate n. It is possible to have population dynamics (births, deaths) in the absence of an ID. It is useful first to figure out what’s going on there before you introduce the disease dynamics.
- Choose various values for the birthrate and lifespan, run the model and see what the population does in the absence of an infectious disease. Can you figure out the equation that relates births, deaths and steady state level for our model? Test it with the simulation.

### Task 14:

- 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. Make sure to convert to months and convert to a rate. Set birth rate such that the population is steady at 1000 in the absence of the ID. Set simulation time to around 500 years, 1 infected, g=5, b=0.015. No vaccine. (Be patient, running the simulation takes some time.)
- Run the simulation, make sure you reach a steady state. Compare the steady state values for S, I and R from the simulation with those predicted from the SIR steady state equations.

### Task 15:

- Use the fraction of susceptibles remaining at steady state to compute R0.
- Double the value of g, run the simulation and again compute R0 using the steady state result.
- Next double the values for both natural birth and death rates and repeat.

### Task 16:

- Keep exploring.