Spatial Error Model (SEM)

Statistics
Introduced by
Anselin
Year
1988
Type
Spatial regression (spatially autocorrelated errors)

What does it do?

The Spatial Error Model, developed within Anselin's spatial econometrics framework (1988), is a regression model in which spatial dependence enters through the error term: the disturbances of neighbouring units are correlated.

It applies when unobserved shared factors make the errors of nearby observations move together. It is estimated by maximum likelihood or GMM, because ordinary least squares remains consistent but is inefficient and gives invalid standard errors under correlated errors.

The intuition behind the method

Imagine a regression on regions where some influences you never measured, such as climate, regional policy or local culture, spill across borders and affect neighbouring areas in similar ways. Those omitted influences end up in the error term, so the unexplained part of one region resembles that of its neighbours. SEM models this by letting each unit's error be partly a weighted average of its neighbours' errors. This absorbs the spillover in the error structure, so the coefficients on the explanatory variables can be read without a spillover adjustment.

History

The Spatial Error Model is associated with Luc Anselin's 1988 book Spatial Econometrics: Methods and Models, which is the cited source for the specification. Within the spatial regression family, the model is usually discussed alongside the spatial lag and spatial Durbin models; this is general background rather than a historical claim.

When to use it

Choose SEM for a continuous outcome measured on cross-sectional data where each unit can be linked to its neighbours through a spatial weights matrix W. It fits when spatial dependence is best understood as coming through unobserved common factors in the errors. The LM-Error and LM-Lag tests help decide this. If only the error-based test points to dependence, SEM is a natural choice. If both point to dependence, consider a general specification such as the SAC model, y = ρWy + Xβ + u with u = λWu + ε, of which SEM is the special case ρ = 0. This is a model-selection step rather than a fixed rule. Do not use SEM when the dependent variable itself is expected to respond to neighbours' outcomes; a spatial lag model is then more appropriate. For repeated observations over time, a spatial panel model is the appropriate alternative. W must be justified from the study's geography rather than assumed. The sample should be large enough for stable estimates of λ and β. About 50 observations is a rough rule of thumb, not a formal threshold, and the appropriate size depends on the number of units, the structure of W and the number of predictors.

Limitations and considerations

  • Results depend on a correctly specified spatial weights matrix W; if the neighbourhood structure is poorly defined, the estimates of λ and β can be biased.
  • A spatial weights matrix needs a basis for defining neighbours, such as geographic coordinates for distance-based weights or shared boundaries for contiguity-based weights. Without any such basis, OLS is the appropriate fallback.
  • Maximum likelihood estimation assumes normally distributed errors; when that assumption is doubtful, GMM is the alternative estimator named for this method.
  • The method is designed for cross-sectional data. Small samples give imprecise estimates of λ and β; about 50 observations is a rough rule of thumb rather than a formal threshold, and the appropriate size depends on the number of units, the structure of W and the number of predictors.

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

Strengths

  • Corrects the inefficiency and invalid standard errors that ordinary least squares suffers when errors are spatially correlated.
  • Captures spillovers from unobserved shared factors (climate, policy, culture) without needing to measure them directly.
  • Coefficients on the predictors keep their usual interpretation, since the spatial dependence is confined to the error term rather than the outcome.

Applications

  • Regional economic analysis where unmeasured shared conditions spill across administrative borders.
  • Housing and real-estate price models where neighbourhood amenities affect clusters of nearby properties.
  • Environmental and public-health studies in which omitted local factors correlate the residuals of adjacent areas.

How it works

How it works

1

The outcome y is still a linear function of the predictors X with coefficients β, but the error u is no longer independent across units. Instead u = λWu + ε, where W is a spatial weights matrix encoding which units are neighbours, λ is the spatial autocorrelation parameter, and ε is an innovation term. The spatial dependence therefore acts through the error channel, not through the dependent variable itself.

Formula
y = X\beta + u, \quad u = \lambda W u + \varepsilon
2

Because the errors are correlated, ordinary least squares stays consistent but is no longer efficient, and its usual standard errors are invalid. The parameters λ, β and the error variance are estimated jointly, either by maximum likelihood under a normal-error assumption or by GMM, the alternative estimator named for this method, which does not depend on the normal-error assumption. Both approaches aim to give reliable estimates and valid inference.

Formula
\hat{\lambda}, \hat{\beta} = \arg\max \; \ell(\lambda, \beta, \sigma^2 \mid y, X, W)

Common pitfalls

  • Fitting SEM when the spatial dependence actually lives in the dependent variable. Compare the LM-Error and LM-Lag tests, and consider a general SAC specification when both point to dependence, before settling on SEM.
  • Treating an arbitrary or untested spatial weights matrix W as ground truth.
  • Relying on ML inference when the normal-error assumption is violated instead of switching to GMM.
  • Forcing SEM onto data with no basis for defining neighbours rather than falling back to standard OLS regression.
  • Reading a significant λ as evidence that neighbours' outcomes directly affect the dependent variable. λ describes dependence in the errors.

Frequently asked questions

How is SEM different from the spatial lag model?

In a spatial lag model the dependent variable of a unit depends directly on its neighbours' outcomes (substantive spillover). In SEM there is no direct spillover in the outcome; instead the unobserved errors are spatially correlated. The LM-Error and LM-Lag diagnostic tests help decide which specification fits the data.

Why not just use OLS?

When errors are spatially correlated, OLS remains consistent but is no longer efficient and its standard errors are invalid, so the t and F tests mislead. ML or GMM estimation of SEM addresses both problems and supports valid inference.

What is the spatial weights matrix W?

W encodes the neighbourhood structure — which units are considered neighbours and how strongly — for example by contiguity or distance. SEM results depend critically on W being correctly specified and exogenous.

When should I prefer GMM over maximum likelihood?

Maximum likelihood estimation of SEM assumes normally distributed errors. GMM is the alternative estimator named for this method and does not depend on that assumption, so it is the usual alternative when normality is doubtful.

Related methods

Sources

  1. Anselin, L. (1988). Spatial Econometrics: Methods and Models. Kluwer Academic.

    Open DOI reference
  2. Introduction to Spatial Econometrics, p. 282