Comparing implementations of global and local indicators of spatial association

Abstract

Functions to calculate measures of spatial association, especially measures of spatial autocorrelation, have been made available in many software applications. Measures may be global, applying to the whole data set under consideration, or local, applying to each observation in the data set. Methods of statistical inference may also be provided, but these will, like the measures themselves, depend on the support of the observations, chosen assumptions, and the way in which spatial association is represented; spatial weights are often used as a representational technique. In addition, assumptions may be made about the underlying mean model, and about error distributions. Different software implementations may choose to expose these choices to the analyst, but the sets of choices available may vary between these implementations, as may default settings. This comparison will consider the implementations of global Moran’s I, Getis–Ord G and Geary’s C, local \(I_i\) and \(G_i\), available in a range of software including Crimestat, GeoDa, ArcGIS, PySAL and R contributed packages.

This is a preview of subscription content, log in to check access.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Notes

  1. 1.

    Some free software, like CrimeStat, is closed source.

  2. 2.

    Source code now available from https://github.com/rsbivand/legacy_systat.

  3. 3.

    For an example, see https://community.esri.com/thread/60740.

  4. 4.

    In implementations we also find \(m_2 = (n - 1)^{-1} \sum _{i=1}^{n}z_i^2\), but this does not seem to have support in the original source.

  5. 5.

    Again, division by \((n-1)\) is encountered in implementations.

  6. 6.

    https://nij.gov/topics/technology/maps/pages/crimestat.aspx.

  7. 7.

    https://github.com/GeoDaCenter/geoda/.

  8. 8.

    https://spatial.uchicago.edu/geoda.

  9. 9.

    http://pysal.readthedocs.io/en/latest/.

  10. 10.

    https://github.com/pysal.

  11. 11.

    https://cran.r-project.org/package=spdep.

  12. 12.

    https://github.com/r-spatial/spdep/.

  13. 13.

    https://data.cdrc.ac.uk/tutorial/an-introduction-to-spatial-data-analysis-and-visualisation-in-r.

  14. 14.

    https://github.com/pysal/pysal/issues/970.

  15. 15.

    https://github.com/GeoDaCenter/geoda/blob/master/Explore/GStatCoordinator.cpp, lines 338–342, 526–527.

References

  1. Alam M, Rönnegård L, Shen X (2015) Fitting conditional and simultaneous autoregressive spatial models in hglm. R J 7(2):5–18. http://journal.r-project.org/archive/2015-2/alam-ronnegard-shen.pdf

  2. Allaire JJ, Ushey K, Tang Y (2018) reticulate: interface to ’Python’. https://CRAN.R-project.org/package=reticulate, R package version 1.8

  3. Anselin L (1992) SpaceStat, a software program for analysis of spatial data. National Center for Geographic Information and Analysis (NCGIA), University of California, Santa Barbara

    Google Scholar 

  4. Anselin L (1995) Local indicators of spatial association—LISA. Geogr Anal 27(2):93–115

    Article  Google Scholar 

  5. Anselin L (1996) The Moran scatterplot as an ESDA tool to assess local instability in spatial association. In: Fischer MM, Scholten HJ, Unwin D (eds) Spatial analytical perspectives on GIS. Taylor & Francis, London, pp 111–125

    Google Scholar 

  6. Anselin L, Syabri I, Kho Y (2006) GeoDa: an introduction to spatial data analysis. Geogr Anal 38:5–22

    Article  Google Scholar 

  7. Assunção R, Reis EA (1999) A new proposal to adjust Moran’s I for population density. Stat Med 18:2147–2162

    Article  Google Scholar 

  8. Bivand RS (1992) SYSTAT-compatible software for modeling spatial dependence among observations. Comput Geosci 18(8):951–963. https://doi.org/10.1016/0098-3004(92)90013-H

    Article  Google Scholar 

  9. Bivand RS (1998) Software and software design issues in the exploration of local dependence. The Statistician 47:499–508

    Google Scholar 

  10. Bivand RS (2006) Implementing spatial data analysis software tools in R. Geogr Anal 38:23–40

    Article  Google Scholar 

  11. Bivand RS (2008) Implementing representations of space in economic geography. J Reg Sci 48:1–27

    Article  Google Scholar 

  12. Bivand RS (2009) Applying measures of spatial autocorrelation: computation and simulation. Geogr Anal 41(375–384):10

    Google Scholar 

  13. Bivand RS, Gebhardt A (2000) Implementing functions for spatial statistical analysis using the R language. J Geogr Syst 2:307–317

    Article  Google Scholar 

  14. Bivand RS, Piras G (2015) Comparing implementations of estimation methods for spatial econometrics. J Stat Softw 63(1):1–36. https://doi.org/10.18637/jss.v063.i18

    Article  Google Scholar 

  15. Bivand RS, Portnov BA (2004) Exploring spatial data analysis techniques using R: the case of observations with no neighbours. In: Anselin L, Florax RJGM, Rey SJ (eds) Advances in spatial econometrics: methodology, tools, applications. Springer, Berlin, pp 121–142

    Google Scholar 

  16. Bivand RS, Müller W, Reder M (2009) Power calculations for global and local Moran’s I. Comput Stat Data Anal 53:2859–2872

    MathSciNet  Article  Google Scholar 

  17. Bivand RS, Sha Z, Osland L, Thorsen IS (2017) A comparison of estimation methods for multilevel models of spatially structured data. Spat Stat. https://doi.org/10.1016/j.spasta.2017.01.002

    MathSciNet  Article  Google Scholar 

  18. Bjornstad ON (2018) ncf: spatial covariance functions. https://CRAN.R-project.org/package=ncf, R package version 1.2-5

  19. Caldas de Castro M, Singer BH (2006) Controlling the false discovery rate: a new application to account for multiple and dependent tests in local statistics of spatial association. Geogr Anal 38(2):180–208. https://doi.org/10.1111/j.0016-7363.2006.00682.x

    Article  Google Scholar 

  20. Cliff AD, Ord JK (1969) The problem of spatial autocorrelation. In: Scott AJ (ed) London Papers in Regional Science 1, Studies in Regional Science. Pion, London, pp 25–55

    Google Scholar 

  21. Cliff AD, Ord JK (1971) Evaluating the percentage points of a spatial autocorrelation coefficient. Geogr Anal 3(1):51–62. https://doi.org/10.1111/j.1538-4632.1971.tb00347.x

    Article  Google Scholar 

  22. Cliff AD, Ord JK (1973) Spatial autocorrelation. Pion, London

    Google Scholar 

  23. Cliff AD, Ord JK (1981) Spatial processes. Pion, London

    Google Scholar 

  24. Cressie NAC (1993) Statistics for spatial data. Wiley, New York

    Google Scholar 

  25. Duncan OD, Cuzzort RP, Duncan B (1961) Statistical geography: problems in analyzing areal data. Free Press, Glencoe

    Google Scholar 

  26. Geary RC (1954) The contiguity ratio and statistical mapping. Inc Stat 5:115–145

    Google Scholar 

  27. Getis A, Ord JK (1992) The analysis of spatial association by the use of distance statistics. Geogr Anal 24(2):189–206

    Google Scholar 

  28. Getis A, Ord JK (1993) Erratum: The analysis of spatial association by the use of distance statistics. Geogr Anal 25(3):276

    Google Scholar 

  29. Getis A, Ord JK (1996) Local spatial statistics: an overview. In: Longley P, Batty M (eds) Spatial analysis: modelling in a GIS environment. GeoInformation International, Cambridge, pp 261–277

    Google Scholar 

  30. Gómez-Rubio V, Ferrándiz-Ferragud J, López-Quílez A (2005) Detecting clusters of disease with R. J Geogr Syst 7(2):189–206

    Article  Google Scholar 

  31. Goodchild MF (1986) Spatial autocorrelation. Geobooks, Norwich. https://alexsingleton.files.wordpress.com/2014/09/47-spatial-aurocorrelation.pdf

  32. Hepple LW (1998) Exact testing for spatial autocorrelation among regression residuals. Environ Plan A 30:85–108

    Article  Google Scholar 

  33. Kalogirou S (2017) lctools: local correlation, spatial inequalities, geographically weighted regression and other tools. https://CRAN.R-project.org/package=lctools, R package version 0.2-6

  34. Levine N (2006) Crime mapping and the CrimeStat program. Geogr Anal 38(1):41–56

    Article  Google Scholar 

  35. Levine N (2017) Crimestat: a spatial statistical program for the analysis of crime incidents. In: Shekhar S, Xiong H, Zhou X (eds) Encyclopedia of GIS. Springer, Cham, pp 381–388. https://doi.org/10.1007/978-3-319-17885-1_229

    Google Scholar 

  36. McMillen DP (2003) Spatial autocorrelation or model misspecification? Int Reg Sci Rev 26:208–217

    Article  Google Scholar 

  37. Moran PAP (1950) Notes on continuous stochastic phenomena. Biometrika 37:17–23

    MathSciNet  Article  Google Scholar 

  38. Ord JK, Getis A (1995) Local spatial autocorrelation statistics: distributional issues and an application. Geogr Anal 27(3):286–306

    Google Scholar 

  39. Ord JK, Getis A (2001) Testing for local spatial autocorrelation in the presence of global autocorrelation. J Reg Sci 41(3):411–432

    Article  Google Scholar 

  40. Ord JK, Getis A (2012) Local spatial heteroscedasticity (LOSH). Ann Reg Sci 48(2):529–539

    Article  Google Scholar 

  41. Paradis E, Claude J, Strimmer K (2004) APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20:289–290

    Article  Google Scholar 

  42. Rey SJ, Anselin L (2007) Pysal: a python library of spatial analytical methods. Rev Reg Stud 37(1):5–27

    Google Scholar 

  43. Rey SJ, Anselin L, Li X, Pahle R, Laura J, Li W, Koschinsky J (2015) Open geospatial analytics with pysal. ISPRS Int J Geoinf 4(2):815–836. https://doi.org/10.3390/ijgi4020815

    Article  Google Scholar 

  44. Ripley BD (1981) Spatial statistics. Wiley, New York

    Google Scholar 

  45. Schabenberger O, Gotway CA (2005) Statistical methods for spatial data analysis. Chapman & Hall, Boca Raton

    Google Scholar 

  46. Scott LM, Janikas MV (2010) Spatial statistics in ArcGIS. In: Fischer MM, Getis A (eds) Handbook of applied spatial analysis: software tools, methods and applications. Springer, Berlin, pp 27–41. https://doi.org/10.1007/978-3-642-03647-7_2

    Google Scholar 

  47. Sokal RR, Oden NL (1978) Spatial autocorrelation in biology: 1. methodology. Biol J Linn Soc 10(2):199–228. https://doi.org/10.1111/j.1095-8312.1978.tb00013.x

    Article  Google Scholar 

  48. Sokal RR, Oden NL, Thomson BA (1998) Local spatial autocorrelation in a biological model. Geogr Anal 30:331–354

    Article  Google Scholar 

  49. Tiefelsdorf M (2000) Modelling spatial processes: the identification and analysis of spatial relationships in regression residuals by means of Moran’s I. Springer, Berlin

    Google Scholar 

  50. Tiefelsdorf M (2002) The saddlepoint approximation of Moran’s I and local Moran’s \({I}_i\) reference distributions and their numerical evaluation. Geogr Anal 34:187–206

    Google Scholar 

  51. Tiefelsdorf M, Boots BN (1995) The exact distribution of Moran’s I. Environ Plan A 27:985–999

    Article  Google Scholar 

  52. Tiefelsdorf M, Boots BN (1997) A note on the extremities of local Moran’s I and their impact on global Moran’s I. Geogr Anal 29:248–257

    Article  Google Scholar 

  53. Westerholt R, Resch B, Zipf A (2015) A local scale-sensitive indicator of spatial autocorrelation for assessing high- and low-value clusters in multiscale datasets. Int J Geogr Inf Sci 29(5):868–887. https://doi.org/10.1080/13658816.2014.1002499

    Article  Google Scholar 

  54. Westerholt R, Resch B, Mocnik FB, Hoffmeister D (2018) A statistical test on the local effects of spatially structured variance. Int J Geogr Inf Sci 32(3):571–600. https://doi.org/10.1080/13658816.2017.1402914

    Article  Google Scholar 

  55. Wong DWS, Lee J (2005) Statistical analysis of geographic information with ArcView GIS and ArcGIS. Wiley, New York

    Google Scholar 

  56. Xu M, Mei CL, Yan N (2014) A note on the null distribution of the local spatial heteroscedasticity (LOSH) statistic. Ann Reg Sci 52(3):697–710

    Article  Google Scholar 

Download references

Acknowledgements

We would like to thank the editors and reviewers for constructive suggestions that we hope have clarified the conclusions of this comparative study. We would also like to thank Shiyang Ruan for assistance with ArcGIS Python programming.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Roger S. Bivand.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Bivand, R.S., Wong, D.W.S. Comparing implementations of global and local indicators of spatial association. TEST 27, 716–748 (2018). https://doi.org/10.1007/s11749-018-0599-x

Download citation

Keywords

  • Software implementations
  • Global spatial autocorrelation
  • Local spatial autocorrelation
  • Lattice data

Mathematics Subject Classification

  • 62P12
  • 62P20
  • 62P25