Modelling COVID-19 infection across England
In this tutorial we’ll cover some of the work we did as part of our study into fitting a Bayesian spatio-temporal model to predict the COVID-19 infection rate across England.
Study aim and data description
The COVID-19 pandemic has had a profound impact on global health and economies, with the spread and evolution of the virus becoming a major concern for health authorities and policymakers. In this study, we aim to investigate the spread and evolution of COVID-19 occurrences across England. The aim of the study is two-fold: on the one hand, fitting a Bayesian spatio-temporal model to predict the COVID-19 infection rate across mainland England over space and time; on the other hand, investigating the impacts of socioeconomic, demographic and environmental factors on COVID-19 infection.
The first thing is to load all the packages used in the COVID-19 case study.
The study region is mainland England, which is partitioned into 6789
neighbourhoods at the Middle Layer Super Output Area (MSOA) scale. The
shapefile of the study region shape
is a
SpatialPolygonsDataFrame
, which is used to map the data. It
stores the location, shape and attributes of geographic features for the
neighbourhoods.load
We first load INLA and then retrieve the data from the fdmr example
data store. We’ll use retrieve_tutorial_data
to do
this.
library(INLA)
## Loading required package: Matrix
## Loading required package: sp
## This is INLA_24.06.27 built 2024-06-27 02:36:04 UTC.
## - See www.r-inla.org/contact-us for how to get help.
## - List available models/likelihoods/etc with inla.list.models()
## - Use inla.doc(<NAME>) to access documentation
fdmr::retrieve_tutorial_data(dataset = "covid")
##
## Tutorial data extracted to /home/runner/fdmr/tutorial_data/covid
Next we’ll use the load_tutorial_data
function to load
in the spatial data we want.
sp_data <- fdmr::load_tutorial_data(dataset = "covid", filename = "spatial_data.rds")
Now we make a map of the study region
sp_data@data$mapp <- 0
domain <- sp_data@data$mapp
fdmr::plot_map(polygon_data = sp_data, domain = domain, add_scale_bar = TRUE, polygon_fill_opacity = 0.5, palette = "YlOrRd")