Publication - Research and analysis

Coronavirus (COVID-19): modelling the epidemic

Published: 21 May 2020
Constitution and Cabinet Directorate
Part of:
Coronavirus in Scotland, Research

Report presents the approach taken by the Scottish Government in modelling the COVID-19 epidemic in Scotland, both in terms of the spread of the disease through the population (epidemiological modelling) and of the demands it will place on the system, for example in terms of health care requirements

17 page PDF

498.1 kB

17 page PDF

498.1 kB

Coronavirus (COVID-19): modelling the epidemic
Annex: Scottish Government Modelling using publically available Imperial College Code

17 page PDF

498.1 kB

Annex: Scottish Government Modelling using publically available Imperial College Code

One of the models used by the Scottish Government to understand the progression of the epidemic is a modified version of the publically available Imperial College Covid-19 model, which has been adapted to fit the situation in Scotland. We use it to help us to understand the longer term progress of the epidemic, and the influence of the introduced measures. It also offers the potential for exploring the impact of easing restrictions in other countries. This model uses publically available data on daily cases and deaths in Scotland, England, Wales and Northern Ireland, as well as in 13 other European countries. This technical annex should be seen in the context of the Imperial College model description.

The key piece of information the model uses is data on numbers of deaths over time across countries. The expected number of deaths in each country is directly related to the numbers of infections occurring in previous days. In the early stages of an epidemic this can be dominated by infections taking place elsewhere (for example, people returning from overseas), so to avoid bias, the model only starts to include data from a country when a total of 10 deaths has been reached.

A specific relationship between infections and deaths, called the Infection Fatality Rate (IFR), is used for each country. As the likelihood of death as a result of COVID-19 infection is strongly related to a person's age, this IFR rate is a reflection of the age structure of each country. To reflect the varying age structure of the UK population across the nations, an age-adjusted IFR for each has been calculated using the IFR value for the UK published by Imperial College London, apportioning population share of each nation, and the relative IFR values produced by Kulu and Dorey (2020)[4], resulting in slightly higher IFR for Scotland than the overall IFR presented by Imperial College for the UK (Table 1).

Table 1. Relative Infection Fatality Rates used in the model for nations in the UK [4].
Country Relative IFR
Scotland 1.03
England 1.00
Wales 1.12
Northern Ireland 0.91

The time between infection and death is made up of two periods, a latent period from infection to the start of symptoms, and an onset-to-death period. The number of deaths today is the sum of the past infections weighted by their probability of death, where the probability of death and the probability of showing symptoms depends on the number of days since infection, and the country-specific IFR.

The Imperial College model takes the observed number of deaths on a given day, and back calculates the number of infections required to result in that number of deaths (with given probability of time until death and onset of disease). The reproductive rate on a given day is estimated by calculating the infectious incidence rate required to go from the previous days result to the numbers of incidence on the next day. The Rt for a given day will not be a fixed value, as it will be updated with new information when each additional week of data is added to the model. Comparisons can be made between values in the same model run but should not be attempted between models using different sets of input data.

Estimates of Rt in the future are calculated by using the death data up to today, providing estimates of the infectious incidence occurring in previous days, and then estimating in the future the numbers of those infections resulting in death. This iterative process continues as deaths decrease.

Estimates are produced for the numbers of: infectious people in the population, cases, deaths and Rt (with confidence intervals) both for the historic period where we have data, and forecast into the future to simulate the progression of the epidemic. As this forecasting projects further into the future the level of uncertainty increases.

The model includes 6 interventions, one of which is constructed from the other 5, which are timings of school, and nursery university closures, self-isolating if ill, banning of public events, "any government intervention in place", implementing a partial or complete lockdown and encouraging social distancing. The interventions are applied from the day they are introduced onwards, as in the Imperial College model. The "any government intervention covariate" is applied when any of the interventions are applied. The dates of interventions used for Scotland are shown in table 2.

Table 2. Dates of interventions for Scotland.
Intervention Date
"Any government intervention" 12 March
Self-isolation 12 March
Mass Gatherings 16 March
Minimise social contact 16 March
Closure of schools and nurseries 20 March
Stay at home 24 March

The model is edited in RStudio Version 1.2.5042 and run using the R statistical computing software, version 3.6.3, on an AMD 64-core Dell Linux system, with 256Gb RAM.