Skip to content

spatialstatisticsupna/Discontinuities_and_Clusters_article

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Estimating disease risks in the presence of local discontinuities and clusters

This repository contains the R code to fit with INLA the spatial and spatio-temporal models described in the work entitled "A two-stage approach to estimate spatial and spatio-temporal disease risks in the presence of local discontinuities and clusters" (Adin et al., 2019).

Table of contents

Data

Two motivating applications are described in this work: stomach cancer mortality data in Spanish provinces during the year 2013, and brain cancer incidence data in 27 administrative regions of Navarre and the Basque Country during the period 2000-2008.

  • StomachCancer_ESP.Rdata

    This .Rdata contains the following objects:

    • Data: data.frame object with the number of observed and expected cases ('obs' and 'exp' variables, respectively) and standardized mortality ratio ('SMR') for each province ('prov') and time period ('year') for stomach cancer mortality data.
    • Carto.ESP: sf object with the cartography of the 47 continental Spanish provinces.
    • W: Spatial adjacency matrix of the Spanish provinces.
  • BrainCancer_MUN.Rdata

    This .Rdata contains the following objects:

    • Data.INCI and Data.MORT: data.frame objects with the number of observed and expected cases ('obs' and 'exp' variables, respectively) and standardized incidence/mortality ratio ('SMR') for each administrative region ('region') and time period ('year') for brain cancer incidence and mortality data.
    • Carto.COM: sf object with the cartography of the 27 administrative regions of Navarre and the Basque Country.
    • W: Spatial adjacency matrix of the administrative regions.

R code

R code to fit with INLA (http://www.r-inla.org/) the two-stage spatial and spatio-temporal models described in Adin et al. (2019). All the R files are written by the authors of the paper.

1. Main files

  • Example1_Spatial_CountData.R

    R code to fit two-stage spatial cluster models using Spanish stomach mortality data (stored in StomachCancer_ESP.Rdata file). It reproduces the results obtained in Section 5.1. of the present work.

  • Example2_SpatioTemporal_CountData.R

    R code to fit two-stage spatio-temporal cluster models using brain cancer incidence data in the regions of Navarre and Basque Country (stored in BrainCancer_MUN.Rdata file). It reproduces the results obtained in Section 5.2. of the present work.

2. Algorithms

  • AHC_function.R

    Agglomerative hierarchical clustering algorithm for spatial data (Anderson et al., 2014).

  • AHC_clusteringST_function.R

    Agglomerative hierarchical clustering algorithm for spatio-temporal data.

  • Model1.R and Model2.R

    R code to fit the spatial models described in Equations (1) and (2) of the present work for each of the cluster configuration candidate.

  • TLmodel1a.R, TLmodel1b.R, TLmodel2a.R and TLmodel2b.R

    R code to fit the spatio-temporal models with purely spatial cluster structures described in Section 3.1 of the present work for each cluster configuration candidate.

  • OptionI.R, OptionII.R, OptionIII.R and OptionIV.R

    R code to fit the spatio-temporal models with space-time cluster structures described in Section 3.2 of the present work for each cluster configuration candidate.

3. Other auxiliary functions

  • Cluster_neighbours.R

    It returns the Kronecker product of 2 matrices and the eigenvectors which span the null space of this product.

  • kronecker_nullspace.R

    Function to create the neighbourhood matrix of areas within each cluster.

*2021/01/11: Slight modifications have been introduced in order to be compatible with the 20.12.10 testing version of INLA. More precisely, we eliminate the redundant constraints in the extraconstr argument of the INLA::inla() function.

Acknowledgements

This work has been supported by the Spanish Ministry of Economy and Competitiveness (project MTM2014-51992-R), by the Spanish Ministry of Economy, Industry, and Competitiveness (project MTM2017-82553-R, AEI/FEDER, UE), and by the UK Medical Research Council (Grant number MR/L022184/1).

References

Adin, A., Lee, D., Goicoa, T., and Ugarte, M.D. (2019). A two-stage approach to estimate spatial and spatio-temporal disease risks in the presence of local discontinuities and clusters. Statistical Methods in Medical Research, 28(9), 2595-2613.

Anderson, C., Lee, D., and Dean, N. (2014). Identifying clusters in Bayesian disease mapping. Biostatistics, 15, 457–469.

About

Motivating applications and R code described in Adin et al. (2019, SMMR)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages