Skip to content

R code to fit the models and reproduce the results described in Adin et al. (2022, SERRA)

License

Notifications You must be signed in to change notification settings

spatialstatisticsupna/DBSC_RR_article

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A clustering adjusted regression model to identify extreme risks in small areas

This repository contains the R code to fit with INLA the spatial models described in the work entitled "Identifying extreme COVID-19 mortality risks in English small areas: a disease cluster approach" (Adin et al., 2022). It also contains the necessary functions to reproduce all the figures and tables of the article.

In this work we consider several classical disease mapping models and an extension of the density-based spatial clustering (DBSC) algorithm proposed in Santafé et al. (2021) to an analysis of COVID-19 related mortality in English small areas during the first wave of the epidemic in the first half of 2020.

Table of contents

Data

COVID-19 mortality data and potential risks factors (covariates) across the 6791 middle super output areas (MSOAs) of England during the period March to June 2020. The data are publicly available online without any form of restriction or copyright.

The England_MSOA.Rdata file contains the following objects:

  • W: spatial adjacency matrix of the MSOAs of England
  • carto: sf object containing the polygons of the MSOAs of England and 12 variables
    • CODE: character vector of geographic identifiers
    • NAME: character vector of MSOAs name
    • Region: classification of MSOAs by region (factor with 9 levels)
    • Urban-Rural: classification of MSOAs according to urbal-rural category (factor with 8 levels)
    • O: observed number of COVID-19 related deaths
    • E: expected number of COVID-19 related deaths
    • SMR: standardized mortality ratio
    • ISOL: Lieberson isolation index
    • NH: nursing home location
    • HDD: health deprivation and disability index
    • AIRQ: measure of poor air quality
    • geometry: sfc_GEOMETRY

The COVID-19 deaths data is associated with the online article by the UK Office of National Statistics entitled "Deaths involving COVID-19 by local area and socioeconomic deprivation: deaths occurring between 1 March and 31 July 2020" (Office of National Statistics (ONS), 2020). Data on ethnicity and nursing homes are from the UK Census, data on health deprivation are from a 2019 compendium of different types of small area deprivation (Ministry of Housing, Communities and Local Government (MHCLG), 2019), while data on air pollution are from the Access to Healthy Assets and Hazards small area indicators profile at https://www.cdrc.ac.uk/new-update-access-to-healthy-assets-and-hazards-ahah-data-resource/.

R code

R code to fit the spatial models with INLA (http://www.r-inla.org/) considered in the present paper, and code to reproduce all the figures and tables. All the R files are written by the authors of the paper.

  • England_MSOA_SpatialModels.R

    R code to fit spatial models using the bigDM package that incorporates area-level random effects (see Equation (1) of Adin et al., 2022), denoted as iCAR, LCAR, BYM or BYM2 depending on the conditional autoregressive (CAR) prior distribution considered for the spatially structured random effect. The restricted regression approach (Reich et al., 2006) has been adopted to deal with spatial confounding between fixed and random effects. For those models, the "+RR" suffix has been added to the notation.

  • England_MSOA_ClusterModels.R

    R code to fit spatial models that incorporate both area-level and cluster-level random effects (see Equation (3) of Adin et al., 2022), denoted as iCAR+C, LCAR+C, BYM+C or BYM2+C depending on the CAR prior distribution adopted for both spatial random effects. Our modelling approach consists of a two-stage procedure. First, the DBSC algorithm (implemented in the bigDM package) is applied over the residuals of the non-spatial model (GLM). Then, a model with area-level and cluster-level random effects is fitted.

    *NOTE: Adjacency matrices (Wk), neighborhood structure matrices (Q.clust) and final INLA datasets (data.INLA.C) that are necessary to fit these models have been previously precomputed and stored at DBSC_nbMatrices.Rdata file to save computation time.

  • England_MSOA_ClusterModels_BYM2_RR.R

    R code to fit the clustering adjusted regression model with the BYM2 prior distribution and restricted regression to deal with spatial confounding issues.

  • Figures_and_Tables.R

    This R script contains the necessary functions to reproduce all the figures and tables of the present paper. The fitted models with INLA can be downloaded from https://emi-sstcdapp.unavarra.es/England_MSOA/INLA_models/.

Acknowledgements

This work has been supported by Projects MTM2017-82553-R (AEI/FEDER, UE) and PID2020-113125RB-I00/MCIN/AEI/10.13039/501100011033.

plot

References

Adin, A., Congdon, P., Santafé, G., and Ugarte, M.D. (2022). Identifying extreme COVID-19 mortality risks in English small areas: a disease cluster approach. Stochastic Environmental Research and Risk Assessment, 36(10):2995-3010. DOI: 10.1007/s00477-022-02175-5

Ministry of Housing, Communities and Local Government (MHCLG). (2019). English Indices of Deprivation 2019. MHCLG, London, UK

Office of National Statistics (ONS). (2020). Deaths involving COVID-19 by local area and socioeconomic deprivation: deaths occurring between 1 March and 31 July 2020. Statistical Bulletin. ONS, London, UK

Reich, B.J., Hodges, J.S., Zadnik, V. (2006). Effects of residual smoothing on the posterior of the fixed effects in disease-mapping models. Biometrics, 62(4):1197-1206.

Santafé, G., Adin, A., Lee, D., and Ugarte, M.D. (2021). Dealing with risk discontinuities to estimate cancer mortality risks when the number of small areas is large. Statistical Methods in Medical Research, 30(1), 6-21.

About

R code to fit the models and reproduce the results described in Adin et al. (2022, SERRA)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages