Bayesian Spatial Error Model
Also known as: Bayesian SEM, Bayesian spatial-error regression, BSEM spatial econometrics, Bayesian spatially correlated error model
The Bayesian Spatial Error Model (Bayesian SEM) estimates a regression in which spatially correlated disturbances are explicitly modelled through a spatial weights matrix, while all parameters — regression coefficients, spatial error autocorrelation, and error variance — receive full posterior distributions via Bayesian inference rather than point estimates.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use the Bayesian SEM when: (1) a classical SEM is indicated by significant residual spatial autocorrelation (Moran's I on OLS residuals) but the cause is attributed to omitted spatially structured variables rather than true contagion; (2) the dataset is small or spatially sparse and asymptotic MLE properties are questionable; (3) prior information about regression coefficients or the plausible range of spatial dependence is available; (4) full uncertainty quantification (credible intervals rather than confidence intervals) is required. Do NOT use it when the spatial process is clearly a contagion/diffusion mechanism (prefer Bayesian Spatial Lag Model), when the spatial weights matrix is mis-specified and sensitivity cannot be assessed, or when a simple non-spatial regression is sufficient (test with Moran's I on residuals first).
Strengths & limitations
- Produces full posterior distributions for all parameters, giving honest uncertainty quantification including for the spatial autocorrelation parameter lambda.
- Naturally handles small and moderate sample sizes where MLE asymptotics are unreliable.
- Allows incorporation of substantive prior knowledge (e.g., a researcher's belief that lambda is unlikely to be near 1).
- Coherent model comparison via marginal likelihoods or DIC to choose between SEM, SLM, and OLS specifications.
- Propagates spatial correlation in errors into coefficient posteriors, yielding more honest standard errors than naive OLS.
- MCMC output enables straightforward inference on non-linear functions of parameters (e.g., impact measures).
- Computationally expensive relative to classical MLE: MCMC chains must be long enough for convergence, and each iteration requires evaluating the Jacobian |I - lambda W| which is O(n^3) for dense matrices.
- Results are sensitive to the choice of spatial weights matrix W; Bayesian inference does not resolve the problem of W mis-specification.
- Requires careful prior specification; uninformative priors can still inadvertently influence the posterior in small samples.
- Convergence diagnosis adds an additional validation burden (trace plots, R-hat statistics, effective sample size).
Frequently asked
What is the difference between the Bayesian SEM and the Bayesian Spatial Lag Model?
In the Spatial Error Model, spatial dependence enters through the error term, meaning the source of clustering is an omitted spatially structured variable. In the Spatial Lag Model, the outcome at each location directly depends on neighboring outcomes — a contagion or diffusion process. The Lagrange Multiplier test or model comparison via marginal likelihoods helps determine which specification fits the data.
How is the spatial weights matrix W chosen?
W encodes which locations are 'neighbors.' Common choices include queen or rook contiguity (shared borders), k-nearest neighbors, or inverse-distance weighting. The choice is substantive and should reflect the theoretical mechanism; results should be tested for sensitivity across at least two plausible W definitions.
Can I run a Bayesian SEM with R or Python?
Yes. In R, the spatialreg package provides MLE estimation and the spdep package supports diagnostic tests; full Bayesian estimation can be done with R-INLA or brms/Stan. In Python, PySAL's spreg module handles MLE, while PyMC or Stan can be used for full Bayesian MCMC.
What does lambda (the spatial error parameter) mean substantively?
Lambda measures the strength of spatial autocorrelation in the error terms after accounting for the covariates. A positive lambda close to 1 indicates strong positive spatial clustering of residuals; a value near zero means the error structure is approximately non-spatial. Lambda does not reflect direct spillovers from neighboring outcomes, only correlated unobserved influences.
How many observations do I need for a reliable Bayesian SEM?
There is no fixed minimum, and the Bayesian framework is more forgiving than MLE in small samples because priors regularize estimation. In practice, at least 50-100 spatial units are recommended to estimate lambda reliably. With fewer units, the posterior for lambda can be very diffuse and sensitive to prior choice, so communicate this uncertainty explicitly.
Sources
- LeSage, J. P., & Pace, R. K. (2009). Introduction to Spatial Econometrics. CRC Press / Taylor & Francis. ISBN: 978-1420064247
- Anselin, L. (1988). Spatial Econometrics: Methods and Models. Kluwer Academic Publishers. ISBN: 978-9024737291
How to cite this page
ScholarGate. (2026, June 3). Bayesian Spatial Error Model. ScholarGate. https://scholargate.app/en/spatial-analysis/bayesian-spatial-error-model
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Bayesian Spatial Durbin ModelSpatial analysis↔ compare
- Bayesian Spatial Lag ModelSpatial analysis↔ compare
- Geographically Weighted RegressionSpatial analysis↔ compare
- Moran's ISpatial analysis↔ compare
- Spatial AutocorrelationSpatial analysis↔ compare
- Spatial Error ModelSpatial analysis↔ compare