Global Spatial Error Model (SEM)

Statistics
Introduced by
Luc Anselin
Year
1988
Type
Spatial regression model
Family
GIS / spatial

What does it do?

The Global Spatial Error Model (SEM) is a regression model in which the errors, rather than the outcome itself, are spatially autocorrelated, with one spatial parameter, lambda, shared by all observations.

It separates predictor effects from spatial dependence left in the residuals by unmeasured influences. When such error dependence is present, OLS standard errors are unreliable, and the SEM corrects the inference that OLS would otherwise give.

The intuition behind the method

Suppose you run a standard regression on geographic data, such as crime rates, house prices or disease counts across districts, and find that the residuals of nearby areas are systematically similar. OLS treats these errors as independent, which makes its standard errors too optimistic. The Global SEM assumes that unmeasured influences, such as soil type, regional policy or shared infrastructure, are spatially correlated, and it models this as a single autocorrelation parameter in the error term. It does not model one unit's outcome feeding into its neighbours' outcomes. Accounting for the error structure gives more reliable standard errors for the predictors of interest.

History

The model is usually attributed to Luc Anselin, whose 1988 monograph Spatial Econometrics: Methods and Models is the originating reference cited here.

When to use it

Choose the Global SEM when the LM-Error test on OLS residuals is significant and the LM-Lag test is not, which suggests that spatial dependence sits in the error rather than in the outcome. When both tests are significant, they do not settle the choice on their own: fit the candidate models, compare them by likelihood ratio statistics or AIC, and check whether residual Moran's I has been reduced. The model suits cross-sectional geographic data in which omitted, spatially correlated variables produce the dependence. Do not use it when theory implies that the outcome in one location directly affects outcomes in neighbouring locations; the Spatial Lag Model is more appropriate there. Avoid it when the main concern is spatial heterogeneity in the regression relationship, where Geographically Weighted Regression is designed for that problem, or when the error dependence parameter is expected to vary across regions, where local spatial regression variants are more suitable. For repeated observations over time, use spatial panel models instead.

Limitations and considerations

  • Assumes that the error autocorrelation parameter lambda is constant across all regions. Where the spatial process differs between sub-regions, a single lambda is a poor summary and local models are needed.
  • Results depend on the chosen spatial weights matrix W, which must be fixed before estimation; a different W can change the estimated lambda and the inference.
  • The ML likelihood requires the log-determinant of (I - lambda*W) at every iteration, so estimation becomes slow for large datasets.
  • The model cannot represent spillovers in the outcome variable. If the true process is a lag process, the SEM is misspecified and its standard errors and tests are distorted.
  • The error model assumes homoskedastic, independent and normally distributed disturbances u for ML inference, so it does not address spatial heteroscedasticity or coefficients that vary across space.
  • Estimates assume that the predictors X are exogenous to the error term. The error model corrects dependence among residuals but not endogeneity of the predictors, so omitted variables correlated with X can still bias the coefficients.

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

Strengths

  • Models the spatial covariance of the errors directly, so inference on the coefficients is corrected when spatially correlated omitted influences would otherwise make OLS standard errors misleading.
  • Adds only lambda to the regression coefficients and the error variance, which keeps the specification compact and easy to interpret.
  • With the error model correctly specified and the disturbances normally distributed, as assumed in the error process, the ML coefficient estimates are consistent and asymptotically efficient. They are not unbiased in general in finite samples.
  • ML estimation produces a likelihood that supports AIC and log-likelihood comparison with other spatial specifications, as used in the diagnostic workflow.
  • Implemented in PySAL, R spdep and GeoDa, which provide the LM tests and residual autocorrelation checks needed to choose and validate the model.

Applications

  • Modelling regional economic growth where unmeasured shared institutions or climate conditions create spatially correlated residuals.
  • Housing price models in which neighbourhood-level influences that are not captured by the predictors appear in the error term.
  • Epidemiological studies estimating disease determinants while controlling for spatially structured unmeasured exposures.
  • Environmental regressions in which pollution that crosses administrative boundaries creates spatially correlated residuals.
  • Electoral and political geography analyses where unobserved regional culture produces geographically patterned residuals.
  • Urban planning models estimating land-use drivers while accounting for unmeasured neighbourhood-level spatial confounders.

How it works

How it works

1

The outcome y is modelled as a linear function of predictors X with coefficient vector beta, plus an error term epsilon. Unlike OLS, the error term is not assumed to be independent across observations: it follows a spatial autoregressive process governed by the spatial weights matrix W and the spatial error parameter lambda.

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

The spatially autocorrelated error epsilon equals the inverse filter (I - lambda*W) applied to independent disturbances u. When lambda is zero, the model reduces to OLS. As lambda grows towards one, neighbouring residuals become more strongly correlated, which indicates stronger spatial dependence in the error. Lambda must lie in the interval between the reciprocals of the smallest and largest eigenvalues of W, the range in which (I - lambda*W) is invertible and the error process is well defined; the estimate is searched within this range.

Formula
\varepsilon = (I - \lambda W)^{-1}u, \quad u \sim N(0, \sigma^2 I)
3

A spatial weights matrix W must be specified before estimation, typically as a contiguity matrix (queen or rook adjacency) for polygon data or a distance-based matrix (k-nearest neighbours or inverse distance) for point data. W is commonly row-standardised so that each row sums to one, which puts the weighted neighbour terms on a comparable scale across units. Lambda is an autocorrelation coefficient for the error, not a direct measure of the share of spillover.

4

Beta, lambda and sigma-squared are estimated jointly, most often by maximum likelihood (ML), with generalised method of moments (GMM) as an alternative. The ML likelihood contains the log-determinant of (I - lambda*W), which makes estimation more computationally demanding than OLS. Standard implementations are available in PySAL, R spdep and GeoDa. Read the output as follows: beta is interpreted as in OLS, as the partial effect of each predictor on y, because the model contains no spatial multiplier that passes an effect to neighbouring units. The estimate of lambda is tested against zero; a significant lambda indicates dependence in the errors, not a spillover in the outcome.

Formula
\hat{\beta}_{ML}, \hat{\lambda}_{ML} = \arg\max \ln L(\beta, \lambda, \sigma^2 | y, X, W)
5

After fitting, check that the SEM is preferred over OLS or the Spatial Lag Model using the Lagrange Multiplier (LM-Error) test on OLS residuals, alongside its LM-Lag counterpart. Inspect Moran's I on the SEM residuals to verify that residual spatial autocorrelation has been reduced. Compare AIC or log-likelihood against competing spatial specifications.

Common pitfalls

  • Choosing SEM without running the LM diagnostics. If the LM-Lag test is significant and the LM-Error test is not, the Spatial Lag Model is the better choice.
  • Using an unsuitable weights matrix, for example treating islands as isolated when they have ferry connections, which misrepresents the spatial structure of the errors.
  • Interpreting lambda as a substantive spillover effect. It measures error correlation that arises from omitted spatial influences, not the outcome feeding into neighbouring units.
  • Skipping Moran's I on the residuals after estimation, so that remaining spatial autocorrelation goes unnoticed.
  • Applying the basic SEM to panel data without accounting for the time dimension, which requires spatial panel extensions.

Frequently asked questions

How is the Global SEM different from the Spatial Lag Model?

The Spatial Lag Model (SLM) places spatial dependence in the outcome variable itself, so the outcome in one location is directly influenced by outcomes in neighbouring locations. The SEM places spatial dependence only in the error term, capturing unmeasured spatially correlated influences without assuming that the outcome in one location causes the outcome in its neighbours. The Lagrange Multiplier diagnostics on OLS residuals guide which model is more appropriate.

Why is the model called 'Global'?

The prefix 'global' signals that the spatial error parameter lambda is a single constant estimated over all observations. This contrasts with local spatial regression approaches, where the parameter is allowed to vary across locations. If you believe the spatial error structure differs substantially by sub-region, a local model may be more appropriate.

Does SEM estimate the effect of neighbouring outcomes on my outcome?

No. SEM models spatially correlated errors, not spillovers in the dependent variable. To estimate how the outcome in neighbouring units feeds back into the focal unit's outcome, use the Spatial Lag Model instead.

How do I choose the spatial weights matrix?

Contiguity matrices (queen or rook) are standard for polygon data such as administrative areas. Distance-based matrices (k-nearest neighbours or inverse distance) suit point data. The choice should reflect the mechanism you believe generates the spatial dependence. Row-standardising W is a common convention that puts the weighted neighbour terms on a comparable scale across units. Sensitivity analysis across alternative W specifications is good practice.

Can I use SEM with panel data?

The basic SEM is designed for cross-sectional data. For repeated-measures spatial data, use spatial panel models that handle individual effects, either fixed or random, together with spatial error autocorrelation. These are available in R packages such as splm.

Related methods

Sources

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

    ISBN: 978-9024737322
  2. Anselin, L., & Bera, A. K. (1998). Spatial dependence in linear regression models with an introduction to spatial econometrics. In A. Ullah & D. E. A. Giles (Eds.), Handbook of Applied Economic Statistics (pp. 237-289). Marcel Dekker.

    Open publication reference