Data and R
code to support Barnard et al., Modelling the medium-term dynamics of SARS-CoV-2 transmission in England in the Omicron era, Nature Communications (2022).
The original pre-print submitted in November 2021 and later versions can be found here
England has experienced a heavy burden of COVID-19, with multiple waves of SARS-CoV-2 transmission since early 2020 and high infection levels following the emergence and spread of Omicron variants since late 2021. In response to rising Omicron cases, booster vaccinations were accelerated and offered to all adults in England. Using a model fitted to more than 2 years of epidemiological data, we project potential dynamics of SARS-CoV-2 infections, hospital admissions and deaths in England to December 2022. We consider key uncertainties including future behavioural change and waning immunity and assess the effectiveness of booster vaccinations in mitigating SARS-CoV-2 disease burden between October 2021 and December 2022. If no new variants emerge, SARS-CoV-2 transmission is expected to decline, with low levels remaining in the coming months. The extent to which projected SARS-CoV-2 transmission resurges later in 2022 depends largely on assumptions around waning immunity and to some extent, behaviour, and seasonality.
A description of how these results were generated using the files in this repository follows below.
The following R
scripts are used to process data prior to model fitting:
build_sitrep_data.R
:R
script to process NHS England sitrep data on COVID-19 deaths, hospital admissions and hospital and ICU bed occupancy (sensitive data provided as part of SPI-M membership, not provided in this repository)build_virusprev_data.R
:R
script to process SARS-CoV-2 PCR prevalence data for NHS England regions (data publicly available from the Office for National Statistics Coronavirus Infection Survey)build_seroprev_data.R
:R
script to process SARS-CoV-2 seroprevalence data for NHS England regions (data publicly available from three sources: the Office for National Statistics Coronavirus Infection Survey, the UK Biobank and Imperial College London's REACT-2 study)build_delta_data.R
:R
script to process genomic sequencing data for the Delta B.1.617.2 variant of concern in NHS England regions (sensitive data provided as part of SPI-M membership, not provided in this repository)build_sgtf_data.R
:R
script to process S gene target failure data used as a proxy for the proportion of infections attributable to the Alpha B.1.1.7 and Omicron B.1.1.529 variants of concern in NHS England regions (sensitive data provided as part of SPI-M membership, not provided in this repository)build_processed_data_for_fitting.R
R
script which takes data outputs from the previous 5 scripts and builds a single.qs
file for model fitting beginningprocessed-data-
build_schoolattendance.R
:R
script to process data on school attendance in England (data publicly available from the UK government's Department for Education statistics)build_schedule_google_mobility.R
:R
script to combine school attendance data from the script above with publicly available Google COVID-19 Community Mobility Reports data to build a single.RDS
schedule file for model fitting, beginning 'schedule3-MTPs-'
build_vax_data.R
:R
script to process COVID-19 immunisations data and to generate vaccination schedules recording the number of individuals receiving vaccinations by vaccine product, date, age and NHS England region
We use fit-omi.R
to generate MCMC fits. We call this script from the command line with the following arguments:
Rscript fit-omi.R FIT_TYPE POP_SET REP_START REP_END WANE_YN VAC_EFF V3_SEVERITY DFR SEAS_YN SEAS_AMP START_FILE BFOLD OMI_PROTECTION OMI_SEV OMI_CRIT BA2_RELU GAM_DISP
For example, we use the following inputs for model fits in the manuscript:
Rscript fit-omi.R relu all 1 5 yeswane central 2.0 1.0 seaslate 0.1 relu_yeswane_sev2.0_22021104 2.5 0.551 0.5 0.5 1.5 0.3
We use pfilter.R
to generate particle-filtered fits from MCMC fits. We call this script from the command line with the following arguments:
Rscript pfilter.R FIT_FILE
For example, we use the following inputs for model fits in the manuscript:
Rscript pfilter.R relu_yeswane_sev2.0_22050605
We use code within paper_mobility.R
to generate mobility scenarios to use as inputs for the projections
We use make_projections.R
to generate model projections from model fits. We call this script from the command line with the following arguments:
Rscript make_projections.R
We use the following scripts to produce Figure files contained in the manuscript:
vaccine_plotting.R
to generate processed files comparing vaccine schedules (for Figure S7)paper_figs_updated.R
(Figures 2, 3, S1A, S1B, S1C, S2, S3, S4A, S4B, S5-S8)plot_story_fig_updated.R
(Figure 4)plot_summary_fig.R
(Figure 5)tableS1.R
(Table S1)
Figure 1 is generated in these Google slides
Some scripts in the main repository are not directly used but are sourced from within other scripts:
booster_schedule.R
is sourced fromfit-omi.R
,pfilter.R
andmake_projections.R
and is used to generate first booster vaccine timings for each 5-year age groupcheck_fit.R
is sourced fromfit-omi.R
,pfilter.R
andmake_projections.R
and is used to check the model fitcommit.R
is sourced frombuild_sitrep_data.R
and is used to compare new data builds to older data buildscpp_funcs.R
is sourced fromfit-omi.R
,pfilter.R
andmake_projections.R
and generates C++ functionskhoury_lookup.R
is sourced fromcpp_funcs.R
andparams.R
and is used to convert vaccine effectiveness assumptions assuming changes in neutralisation foldparams.R
is sourced fromfit-omi.R
,pfilter.R
andmake_projections.R
and sets up model parametersprocesses.R
is sourced fromfit-omi.R
,pfilter.R
andmake_projections.R
and sets up burden processesspim_output.R
is sourced frombuild_processed_data_for_fitting.R
,fit-omi.R
,pfilter.R
,paper_figs_updated.R
,plot_story_fig_updated.R
andmake_projections.R
and generates sample model fits and projectionsvax_analysis.R
was used to generate summary statistics based on the rollout of COVID-19 vaccines in 2021 (e.g. the typical delays between first and second doses)vax_funcs.R
is sourced frombuild_vax_data.R
andvax_analysis.R
and contains functions for processing vaccinations data
Other subfolders:
./covidm_for_fitting/
contains the covidm model itself (we are using version 3, contained incovidm_for_fitting/model_v3/
)./scripts/
containsfitmodel.sh
which is a shell script used to run the MCMC fitting (i.e.fit-omi.R
) from the command line./data/
contains data files required to run the model (e.g. information on demographics and NHS England regions) and data required to generate model assumptions (e.g. on booster vaccination uptake and on school attendance)./fits/
is where model fits are saved and read from./fitting_data/
usually contains all of the data required to run the model fitting (this data is not publicly available and thus is not provided in this repository)./output/
is where model output files get saved
The analysis was performed using R
version 4.0.3 (2020-10-10).
For any issues with the code please contact Rosanna Barnard.