Panel Spatial Regression

Statistics
Introduced by
Anselin, Elhorst, and colleagues in spatial econometrics
Year
1988-2014
Type
Spatial panel regression
Family
GIS / spatial

What does it do?

Panel Spatial Regression extends standard panel data models by explicitly accounting for spatial dependence among cross-sectional units observed over time.

It combines the temporal control of panel fixed or random effects with a spatial weights matrix that encodes geographic or network proximity. When observations are spatially correlated across units, ignoring that dependence can bias the results of an aspatial panel model, and the estimators are designed to address this. Their properties depend on the chosen estimator (ML or GMM) and its assumptions.

The intuition behind the method

Imagine tracking house prices in hundreds of neighbourhoods year after year. Prices in one neighbourhood are likely influenced not only by its own characteristics but also by what is happening in adjacent neighbourhoods. A standard panel model ignores these cross-neighbourhood spillovers. Panel Spatial Regression adds a spatial lag or spatial error term that lets each unit's outcome or disturbance depend on its neighbours, while still controlling for unmeasured unit-level and time-level confounders through fixed or random effects.

History

The cross-sectional foundations of spatial econometrics are generally attributed to Anselin. The extension to panel data was developed during the 2000s by Anselin, Elhorst, Kapoor, Kelejian, Prucha, and others, and is surveyed in Anselin, Le Gallo, and Jayet (2008). Elhorst's 2014 Springer monograph, Spatial Econometrics: From Cross-Sectional Data to Spatial Panels, is a standard reference for this literature. The framework is now applied in regional science, urban economics, environmental economics, and political science.

When to use it

Use Panel Spatial Regression when you have repeated observations on georeferenced or network-linked units (countries, regions, cities, firms) and either theory or exploratory tests such as Moran's I suggest spatial dependence in the outcome or the errors. It is a natural extension of a standard panel model when spillovers between units are substantively meaningful, for example regional economic growth, disease spread, environmental pollution, or housing markets. If LM tests are insignificant across several plausible weight matrices, a spatial panel model is not clearly needed. A non-significant result under a single W specification does not establish that spatial dependence is absent, so report the tests under alternative W specifications before dropping the spatial terms. Be cautious when the number of time periods is very short, because spatial ML estimates may then be unreliable, and when the weight matrix is theoretically unjustified or chosen arbitrarily.

Limitations and considerations

  • Results are sensitive to the choice and construction of the spatial weights matrix W; different specifications can yield different rho estimates.
  • ML estimation requires a correctly specified error distribution and becomes computationally costly as the number of units grows large.
  • Fixed effects estimators cannot identify coefficients on time-invariant spatial variables (e.g., geographic area, latitude) unless an IV or correlated random effects approach is used.
  • The Nickell bias warning applies only if the model is extended to a dynamic specification with a lagged dependent variable. In that case, short panels can yield biased estimates unless the bias is corrected. The static specification shown here does not carry this problem.
  • Interpretation of indirect (spillover) effects requires computing the full n x n impact matrix, which is non-trivial to summarise.

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

Strengths

  • Jointly controls for unobserved unit heterogeneity (fixed/random effects) and spatial spillovers in one coherent framework.
  • Estimates the spillover parameter rho and the direct covariate effects beta while controlling for unit and time effects. Aspatial panel models omit rho altogether, and cross-sectional spatial models do not use the repeated observations that the panel provides.
  • LM and robust LM diagnostic tests provide principled model selection between spatial lag, spatial error, and unrestricted specifications.
  • Decomposes total effects into direct, indirect (spillover), and total impacts, enabling richer policy interpretation.
  • Scales to large spatial panels through GMM estimators, which avoid the computational burden of ML on large weight matrices.

Applications

  • Estimating regional economic growth spillovers across countries or provinces using multi-year GDP panel data.
  • Modelling the spatial diffusion of disease incidence rates across administrative units over multiple epidemic seasons.
  • Analysing housing price spillovers across contiguous urban neighbourhoods observed repeatedly over time.
  • Studying environmental pollution transmission across regions subject to shared air-shed or watershed geographies.
  • Evaluating how fiscal policy or tax competition in one jurisdiction affects neighbouring jurisdictions over time.
  • Quantifying technology or knowledge spillovers across firms or industries located in spatially proximate clusters.

How it works

How it works

1

The core model augments the standard panel specification with a spatial lag of the dependent variable (rho * Wy) and/or a spatial error component. The spatial lag coefficient rho captures direct spillovers from neighbouring units, beta captures the effect of own covariates, and the error captures remaining idiosyncratic shocks.

Formula
y_{it} = \rho W y_{it} + X_{it}\beta + \mu_i + \lambda_t + \varepsilon_{it}
2

A spatial weights matrix W (n x n) encodes proximity between units; common choices are contiguity (shared borders), inverse distance, or k-nearest neighbours. W is row-standardised so that each row sums to one, making rho directly interpretable as an average neighbour effect. W must be fixed in advance and exogenous to the outcome: it should be set from geography or theory, not estimated from or chosen using y, because outcome-dependent weights make the spatial terms endogenous.

Formula
W = \text{row-standardised spatial weights matrix}
3

Unit-specific fixed effects (mu_i) absorb time-invariant unobserved heterogeneity; time fixed effects (lambda_t) absorb common shocks. Including both is the two-way fixed effects specification. When unit effects are uncorrelated with regressors a random effects estimator is more efficient and permits time-invariant regressors.

4

Because the spatially lagged dependent variable Wy is endogenous, OLS is biased and inconsistent under a spatial lag, and inefficient under a spatial error. Estimation therefore uses Maximum Likelihood (ML) or Instrumental Variables / Generalized Method of Moments (IV/GMM). ML is standard when n is moderate; GMM scales better to large panels and relaxes distributional assumptions. Consistency also requires that the regressors be uncorrelated with the idiosyncratic errors (strict exogeneity conditional on the unit effects in the fixed-effects case). ML further assumes a correctly specified, normally distributed error distribution, which GMM relaxes.

5

Lagrange Multiplier (LM) tests on the residuals of a standard panel model distinguish whether spatial lag, spatial error, or both specifications are needed. Hausman tests guide the choice between fixed and random effects; robust LM tests remain valid under local misspecification.

Common pitfalls

  • Selecting W based on data fit rather than economic or geographic theory; this inflates spatial dependence statistics and leads to spurious inference.
  • Ignoring the endogeneity of the spatial lag and using OLS — the resulting coefficients are biased and inconsistent.
  • Omitting time fixed effects when common time shocks are present, which conflates temporal trends with spatial spillovers.
  • Interpreting the spatial lag coefficient rho alone as the full spillover effect, rather than computing proper direct and indirect impact matrices.
  • Running a two-way fixed effects spatial model on a cross-section (T = 1) — there is no panel structure to exploit, and a cross-sectional spatial model suffices.

Frequently asked questions

How do I choose between the spatial lag model and the spatial error model for panel data?

Run Lagrange Multiplier (LM) tests on the residuals of a standard panel regression. If LM-lag is significant and LM-error is not, prefer the spatial lag model. If both are significant, use the robust versions (RLM-lag, RLM-error) - whichever remains significant guides the choice. When theory strongly predicts spillovers in the outcome itself (e.g., competitive dynamics), the lag model is preferred on substantive grounds.

What is the difference between direct and indirect (spillover) effects in a spatial panel?

In a spatial lag model the coefficient beta on a regressor x is not the total effect of x on y, because a change in x in one unit feeds back through the spatial lag. The direct effect measures the own-unit impact (including feedback loops), while the indirect effect captures the average impact on all other units. These are computed from the full (I - rho W)^-1 matrix and should be reported instead of bare beta and rho values.

Should I use fixed effects or random effects in a spatial panel?

Apply a Hausman test: if unit effects are correlated with the regressors, fixed effects are consistent (random effects are not). Fixed effects also allow free correlation between unmeasured unit heterogeneity and covariates, which is usually the safer assumption in economic panels. Random effects are more efficient when the correlation is absent and allow identification of time-invariant regressors.

Can I use any distance measure to build the spatial weights matrix W?

Any proximity measure that is theoretically justified and fixed in advance can be used, such as contiguity, inverse distance, k-nearest neighbours, or travel time. Weights built from outcome-linked quantities, such as trade flows, are themselves endogenous to the dependent variable and should not be used. The key requirement is that W is exogenous to the outcome (not data-driven on y) and row-standardised. Sensitivity analysis across two or three plausible W specifications is good practice and strengthens robustness of conclusions.

What software can estimate panel spatial regression?

The splm package in R provides ML and GM estimators for spatial panel models. Stata's spxtregress command supports spatial panel estimation. Elhorst's MATLAB routines are also widely used in applied research.

Related methods

Sources

  1. Elhorst, J. P. (2014). Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. Springer.

    ISBN: 978-3642403408
  2. Anselin, L., Le Gallo, J., & Jayet, H. (2008). Spatial Panel Econometrics. In: The Econometrics of Panel Data (pp. 625-660). Springer, Berlin, Heidelberg.

    Open DOI reference