Spatial Autocorrelation

Statistics
Introduced by
P. A. P. Moran (global measure, 1950); Roy Geary (Geary's C, 1954); Luc Anselin (LISA, 1995)
Year
1950
Type
Spatial statistic / exploratory spatial data analysis
Family
GIS / spatial

What does it do?

Spatial autocorrelation measures how strongly a variable's values at nearby locations resemble one another, compared with what would be expected if the values were arranged at random.

Positive autocorrelation means similar values tend to sit together, while negative autocorrelation means dissimilar values tend to be neighbours. Global indices such as Moran's I summarise the pattern across the whole study area, and local variants identify clusters and outliers at the level of individual observations.

The intuition behind the method

Tobler's First Law of Geography states that nearby things are more related than distant things. Spatial autocorrelation tests whether this holds for a specific variable in a specific dataset. If high values of income tend to occur next to other high values and low values cluster together, the pattern is positively autocorrelated, as with affluent suburbs surrounded by other affluent suburbs. Negative autocorrelation, a checkerboard-like arrangement, is rarer but can appear in land-use or competition data. A Moran's I close to its expected value under spatial randomness indicates no detectable spatial dependence.

History

P. A. P. Moran introduced the global index now called Moran's I in a 1950 paper in Biometrika (Moran, 1950). Roy Geary proposed a complementary measure, Geary's C. Luc Anselin's 1988 book Spatial Econometrics: Methods and Models brought these ideas into a regression framework, and his later work introduced the local indicators of spatial association (LISA), extending spatial autocorrelation from a global diagnostic to a local exploratory tool.

When to use it

Use spatial autocorrelation when your observations have geographic coordinates or area identifiers and nearby values may be related, for example before modelling disease rates or house prices by area. As a diagnostic on the residuals of a non-spatial regression, a significant global I signals that the independence assumption may be violated. Its causes can include omitted spatially structured variables, functional-form error, or a spatial lag or error process, so formal diagnostic tests should guide the choice of any spatial model. Prefer the local statistics when the pattern may vary across the study area, since a single global value can hide this. Do not use it without a justified weights matrix, and do not use it when the units have no meaningful spatial arrangement for the process under study.

Limitations and considerations

  • Results depend on the weights matrix: a different neighbour definition, such as queen versus rook contiguity or a distance band, can change both the value of I and its significance.
  • The global I averages over the study area, so co-existing positive and negative local patterns can cancel out and go unnoticed.
  • The closed-form inference relies on normality or randomisation assumptions; with skewed values, permutation p-values are preferable.
  • The statistic is descriptive. A significant I shows that values are patterned in space, not which process produces the pattern.
  • Locations near the study-area boundary have fewer neighbours, so their local statistics can be biased.
  • The method assumes spatial stationarity (constant mean and variance across the study area), that autocorrelation depends on distance or neighbourhood structure rather than absolute location, approximate isotropy when a single weights matrix is used, and weights defined in advance. Violations, such as strong regional trends or directional processes, make I harder to interpret.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Gives a single summary of clustering in the attribute, usually read on a scale from -1 to +1, although the exact bounds depend on the weights matrix.
  • Under the null hypothesis of no spatial pattern, the expected value and variance have closed-form expressions, so inference does not require simulation.
  • The local decomposition attaches a score to each location, so clusters and outliers can be mapped rather than only summarised.
  • Applied to regression residuals, it checks whether the independence assumption behind OLS inference is violated, which is the usual reason to move to a spatial econometric model.
  • Implemented in several free tools (GeoDa, R spdep, PySAL) and in standard GIS software.
  • Works with polygon (areal) and point data, provided the weights are defined in a way suited to the geometry.

Applications

  • Detecting disease clusters in epidemiology — identifying where incidence rates are significantly higher than neighbouring areas.
  • Urban economics: testing whether property prices cluster by neighbourhood quality before fitting a hedonic price model.
  • Ecology and biogeography: assessing whether species richness or habitat suitability is spatially structured.
  • Crime analysis: locating crime hotspots and cold spots to guide policing resource allocation.
  • Regional economics: diagnosing residual spatial dependence in regional convergence regressions.
  • Public health surveillance: monitoring the spread of infectious disease and identifying spatial diffusion corridors.

How it works

How it works

1

Construct a spatial weights matrix W that encodes which locations count as neighbours. For polygon data, contiguity weights (queen or rook adjacency) set w_ij = 1 for neighbours and 0 otherwise; these are commonly row-standardised so that each row sums to one. For point data, distance-band or inverse-distance weights are common alternatives. The weights should be fixed before the results are examined.

Formula
w_{ij} \in \{0,1\} \text{ (or distance-decay)}, \sum_j w_{ij} = 1
2

Compute the global Moran's I. The numerator sums the cross-products of mean-centred values over all location pairs, weighted by W, and the denominator is the total sum of squares of the centred values. S0 denotes the sum of all weights (the sum over i and j of w_ij), which normalises the statistic. Positive values indicate clustering of similar values, negative values indicate dispersion, and values close to the expected value under randomness indicate no detectable spatial pattern.

Formula
I = \frac{n}{S_0} \frac{\sum_i \sum_j w_{ij}(x_i-\bar{x})(x_j-\bar{x})}{\sum_i (x_i-\bar{x})^2}
3

Test whether the observed I departs from its expected value under the null hypothesis of no spatial pattern. Under the normality or randomisation assumptions, the z-score and p-value are computed analytically. When values are skewed, permutation inference, which randomly relabels values across locations to build a reference distribution, is more reliable. Use a large number of permutations and report the number used.

Formula
z = \frac{I - E[I]}{\sqrt{\text{Var}[I]}}
4

Decompose the global statistic into location-specific Local Moran's I values (LISA). Each local score compares a location's standardised value with the weighted average of its neighbours' standardised values. Significant scores can then be classified as High-High, Low-Low, High-Low or Low-High and shown on a LISA cluster map.

Formula
I_i = z_i \sum_j w_{ij} z_j
5

Read the results together with the maps. Compare the z-score or permutation p-value with a significance level fixed in advance; the cluster-map convention in the supplied library uses p < 0.05. Classify significant local values as High-High, Low-Low, High-Low or Low-High. These labels describe local association, not causation. Apply a multiple-testing correction when mapping many local statistics. Persistent autocorrelation in model residuals signals that the model's independence assumption may be violated.

Common pitfalls

  • Choosing a single distance band without testing alternatives: a significant result may depend on that bandwidth.
  • Reading a significant global I as evidence of clustering everywhere; check the LISA cluster map for local heterogeneity.
  • Applying the statistic to raw counts from areas of unequal population, where count differences may reflect population size; use rates or standardised values instead.
  • Mapping many local statistics without a multiple-testing correction; apply a False Discovery Rate or Bonferroni adjustment.
  • Treating autocorrelation in regression residuals as a minor nuisance; it signals that the independence assumption is violated, which may arise from omitted spatial variables, functional-form error, or a spatial lag or error process.

Frequently asked questions

What does a Moran's I of 0.6 mean?

A value of 0.6 indicates positive spatial autocorrelation: locations with high values tend to be surrounded by neighbours that also have high values, and vice versa. The magnitude of I depends on the weights specification and sample size, so it is not a fixed scale of strength. Judge significance from the associated z-score or permutation p-value, check sensitivity to alternative weights, and report all of these.

How do I choose a spatial weights matrix?

For polygon data, queen contiguity (shared edges or corners) is the most common default; rook contiguity (shared edges only) is appropriate for regular grids. For point data, a fixed-distance band or k-nearest-neighbours weights are standard. Always test sensitivity to the choice, because different specifications can materially change the Moran's I value.

Can I run spatial autocorrelation on regression residuals?

Yes, this is one of its most important uses. Applying Moran's I to OLS residuals tests whether the independence assumption is violated. A significant result means that assumption is in doubt. Possible causes include omitted spatially structured variables, functional-form error, or a spatial lag or error process. Formal diagnostic tests should guide whether a spatial econometric model is fitted.

What is the difference between global and local spatial autocorrelation?

The global Moran's I summarises the overall tendency to cluster across the entire study area in a single number. Local Moran's I (LISA) decomposes this into location-specific scores, revealing where significant clusters or spatial outliers occur — information that the global measure averages away.

Is spatial autocorrelation a problem or a feature?

Both. As a feature it reveals genuine geographic processes and structures worth mapping and explaining. As a problem, autocorrelated residuals in a regression model invalidate OLS standard errors and inflate the apparent precision of estimates; the remedy is to use a spatial econometric model or spatial filtering.

Related methods

Sources

  1. Moran, P. A. P. (1950). Notes on continuous stochastic phenomena. Biometrika, 37(1/2), 17–23.

    Open DOI reference
  2. Anselin, L. (1988). Spatial Econometrics: Methods and Models. Kluwer Academic Publishers.

    ISBN: 978-9024737322