- Introduced by
- Anselin, L.; Elhorst, J. P.
- Year
- 1988–2003
- Type
- Diagnostic test / exploratory statistic
- Family
- GIS / spatial
What does it do?
Panel Spatial Autocorrelation measures whether geographically close units tend to have similar values across repeated time periods.
It extends cross-sectional spatial autocorrelation statistics such as Moran's I to panel data, so that spatial dependence can be examined period by period and summarised across the panel. Researchers use it to decide whether a panel regression needs a spatial component.
The intuition behind the method
Think of a panel dataset as a series of maps, one per time period, in which each unit (country, region, city) carries a measured value. The question is whether nearby units resemble each other more than distant units do, and whether that pattern persists over time. In a regression setting, the relevant object is the residual map: if the residuals of neighbouring units keep moving together, the aspatial model has left spatial dependence unexplained. Ignoring such dependence can bias coefficient estimates when the outcome is itself spatially lagged, and can make standard errors unreliable in other cases.
History
Moran (1950) and Geary (1954) formalised spatial autocorrelation statistics for cross-sectional data. Anselin's Spatial Econometrics (originally published 1988) placed these diagnostics within a regression framework. Extensions to spatial panels are treated in Elhorst's 2014 book, which this page cites; the earliest panel-specific diagnostics are not documented here and should be checked against the literature.
When to use it
Use Panel Spatial Autocorrelation when you have repeated observations across geographic units (countries, regions, census tracts) and want to confirm or rule out spatial dependence before fitting a panel regression. It is appropriate when the panel is balanced or near-balanced and units can be assigned a location or shared-border relationship. Do not use it as a standalone model for prediction; it is a diagnostic and exploratory tool. Avoid it when geographic proximity has no theoretical relevance to the outcome. Be cautious when the number of time periods is very small, because each period-level statistic then rests on little information and the pooled summary becomes less stable.
Limitations and considerations
- Results depend on the spatial weights matrix W; contiguity, distance-band, and nearest-neighbour choices can lead to different conclusions, so sensitivity checks are needed.
- Period-specific Moran's I values are not independent when the residuals are serially correlated, which complicates joint inference on the pooled statistic.
- With very few time periods (see the caution on this in the when-to-use guidance), each period-level statistic rests on little information, and the pooled summary is correspondingly less stable.
- Detects the presence of spatial dependence but does not identify its source or which spatial panel model is correct.
- Edge effects and irregular unit shapes or sizes can distort the weights matrix and bias results.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Tests whether spatial dependence in the regression residuals persists across periods, which informs the choice between an aspatial, a spatial lag, and a spatial error panel specification.
- Period-by-period Moran's I values show whether spatial clustering intensifies, weakens, or shifts over time.
- Applies the familiar Moran's I formula to each residual vector, so it can be computed directly from standard fixed-effects or random-effects residuals.
- Does not require estimating a full spatial panel model first, so it can be run as a diagnostic on a baseline regression.
- Uses the same weights matrix W that a spatial panel model would use, so the diagnostic and the subsequent estimation share one specification.
Applications
- Diagnosing cross-country income or productivity spillovers before fitting a spatial growth regression on country-year panels.
- Testing for neighbourhood contagion in housing price panels (cities observed over multiple years) to decide between aspatial and spatial panel models.
- Detecting spatial clustering of disease incidence rates in regional public-health surveillance panels.
- Checking for spatial dependence in regional unemployment panels before applying spatial fixed-effects or spatial Durbin panel estimators.
- Assessing whether agricultural yield shocks exhibit spatial comovement across provinces over time, informing spatial risk-sharing models.
- Exploring spatio-temporal patterns in air-quality panels (monitoring stations over years) prior to spatial interpolation or regression.
How it works
How it works
A spatial weights matrix W encodes proximity between units, for example binary contiguity (shared border), inverse distance, or k-nearest neighbours. W is row-standardised, so that a spatial lag is a weighted average of neighbouring values. The choice of W is a modelling decision and should be justified on substantive grounds.
A baseline panel model (pooled OLS, fixed effects, or random effects) is estimated first. Its residuals hold the variation that the regressors do not explain, and spatial autocorrelation is assessed from their geographic pattern rather than from the raw outcome.
For each period t, Moran's I is computed from the residual vector e_t and W. Residuals should be centred on their period mean, as in the standard Moran's I, before the formula is applied. S0 is the sum of all elements of W. The statistic compares the spatial lag of the residuals with their own variation. With a row-standardised W, each row sums to one, so S0 equals n and the factor n/S0 reduces to one. The normalisation used by the StatWise implementation should be confirmed in its documentation.
Formula
I_t = \frac{n}{S_0} \frac{\mathbf{e}_t^\top W \mathbf{e}_t}{\mathbf{e}_t^\top \mathbf{e}_t}Period-specific values I_t can each be read on their own to see how clustering changes across periods. They are also combined into one panel summary. The pooled significance decision relies on the summary and reference distribution implemented in StatWise, so consult its documentation for the exact rule before interpreting a pooled result.
Inference on the pooled summary depends on the reference distribution implemented for the chosen pooling, which should be checked in the StatWise documentation. Serial correlation across periods affects that distribution. Rejecting the null of no spatial autocorrelation suggests that a spatial lag, spatial error, or spatial Durbin panel model may be needed in place of the aspatial specification. Lagrange Multiplier tests on the residuals help choose among these spatial panel specifications, as the FAQ notes. Pesaran's CD test is a different tool: it tests cross-sectional dependence without a spatial weights matrix, so it suits cases where dependence is not tied to geography.
Common pitfalls
- Using a row-standardised contiguity matrix when units differ greatly in size or population, which can give disproportionate influence to small or island units; distance-band or k-nearest-neighbour weights may be more suitable.
- Testing for spatial autocorrelation in raw outcome values rather than in model residuals, which confounds spatial dependence with spatial variation in the mean.
- Ignoring serial correlation when pooling period-specific Moran's I values, which can misstate the uncertainty of the combined statistic.
- Treating a statistically significant global Moran's I as sufficient evidence; follow up with LISA maps to check whether clustering is spread across the panel or confined to a few hotspot regions.
- Skipping re-diagnosis after switching to a spatial panel model; the new residuals should be checked again to confirm that the spatial dependence has been accounted for.
Frequently asked questions
How does Panel Spatial Autocorrelation differ from ordinary Moran's I?
Ordinary Moran's I is computed for a single cross-section. Panel Spatial Autocorrelation applies Moran's I (or equivalent diagnostics) to each time period's residuals and then aggregates the results, providing an overall test that accounts for the repeated-measurement structure of the data.
Which spatial weights matrix should I use?
There is no universal answer. Queen or rook contiguity is common for administrative regions sharing borders. Inverse-distance or k-nearest-neighbour weights suit point data or highly irregular units. Sensitivity analysis across two or three plausible specifications is recommended; conclusions that change with W deserve caution.
What do I do if I find significant spatial autocorrelation?
The next step is model selection: compare the Lagrange Multiplier tests for the spatial lag panel model versus the spatial error panel model. If both are significant, the spatial Durbin panel model or the general nesting spatial model may be appropriate. Re-estimate with the preferred spatial specification and re-run the autocorrelation diagnostics on the new residuals.
Can I apply this with an unbalanced panel?
Yes, with care. Each period-specific Moran's I can be computed only if the same set of spatial units is observed in every period used for that statistic, because the weights matrix must be consistent across those periods. Units missing in some periods must either be dropped or the analysis restricted to periods with a complete set of units. Listwise deletion or imputation may be needed before analysis.
Is Panel Spatial Autocorrelation the same as Pesaran's CD test?
No. Pesaran's cross-sectional dependence (CD) test checks for correlation among panel units without requiring a geographic structure, because it does not use a spatial weights matrix. Panel Spatial Autocorrelation uses W to test for dependence that follows a specified geography. When a geographic ordering is plausible, the spatial test is the natural choice; when dependence may arise through channels unrelated to location, a non-spatial dependence test is more appropriate.
Related methods
Sources
Anselin, L. (2013). Spatial Econometrics: Methods and Models. Springer Netherlands. (Originally published 1988.)
ISBN: 978-9401577991Elhorst, J. P. (2014). Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. Springer Berlin Heidelberg.
ISBN: 978-3642403408