- Introduced by
- LeSage (1997); fully elaborated in LeSage & Pace (2009)
- Year
- 1997
- Type
- Bayesian spatial regression
- Family
- GIS / spatial
What does it do?
The Bayesian Spatial Lag Model (BSLM) extends the classical spatial autoregressive (SAR) lag regression by placing prior distributions on all parameters and estimating their joint posterior distribution by MCMC sampling.
It models dependence in which the outcome at one location is partly a function of outcomes at neighboring locations, through the spatially lagged term ρWy. The result is a full posterior for the regression coefficients and for the spatial autocorrelation parameter ρ, rather than only point estimates and asymptotic standard errors.
The intuition behind the method
Imagine that house prices in a neighborhood are pulled upward when surrounding neighborhoods are expensive, not only because of local characteristics. The spatial lag model represents this contagion as a weighted average of neighbors' outcomes. The Bayesian version does not give a single best guess for how strong the contagion is. It gives a probability distribution that reflects both the data and the prior information supplied by the analyst. Because the uncertainty about ρ and β carries into the estimated spillover effects, those effects can be reported with credible intervals.
History
Anselin (1988) developed a taxonomy of spatial autoregressive models, estimated within a regression framework by maximum likelihood, and the classical spatial lag model belongs to that framework. LeSage's 1997 paper introduced a Bayesian approach to estimating spatial autoregressive models based on Gibbs sampling; its abstract also emphasizes that the approach accommodates non-constant variance of unspecified form and outliers in the sample data. The full treatment, including the impact decomposition, is presented in LeSage and Pace (2009).
When to use it
Choose this model when the outcome is observed for areal units or lattice locations, a spatial weights matrix can be defined on substantive grounds, and the spatial dependence is thought to arise from spillovers in the outcome itself, for example crime diffusion, regional growth contagion, disease spread or housing price cascades. The Bayesian form is useful when posterior uncertainty about ρ matters, when the sample is modest and asymptotic standard errors are questionable, or when prior knowledge about the strength of dependence is available. Do not use it when the spatial dependence sits in the error term rather than in the outcome; the Bayesian Spatial Error Model is the appropriate alternative in that case. It is also a poor fit for point-pattern data, or when W cannot be justified theoretically.
Limitations and considerations
- Sampling is computationally costly for large datasets because the Jacobian |I − ρW| must be evaluated at each iteration, and the cost rises with the number of spatial units.
- Results depend on W, which theory seldom determines uniquely; a different contiguity or distance definition can change the estimated ρ and the implied impacts.
- Indirect spillover effects are easy to misread, and their size depends on the chosen W and on ρ.
- MCMC chains must be checked for convergence; poor mixing makes the posterior summaries unreliable.
- With a small sample, a tight prior on ρ can dominate the likelihood, so the prior needs a substantive justification rather than being chosen for convenience.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Returns a full posterior for β, σ and ρ, so uncertainty about the spatial dependence parameter is reported rather than only a point estimate and an asymptotic standard error.
- Treats the spatial lag as part of a simultaneous structure, so the feedback through (I − ρW)⁻¹ is built into the model rather than omitted.
- Allows prior knowledge about the plausible range or direction of ρ to enter the analysis, which can matter when the sample is small.
- Produces posterior distributions for the direct, indirect and total impacts, so the spillover part of a covariate's effect carries its own uncertainty.
Applications
- Regional economics: estimating knowledge spillovers across contiguous regions, where GDP growth in one region raises growth in neighbors.
- Criminology: modeling crime diffusion across police districts when crime in one area shifts to adjacent areas.
- Public health: quantifying disease contagion across census tracts or counties with a spatial multiplier.
- Real estate: capturing how housing price shocks in one neighborhood propagate to surrounding neighborhoods.
- Political science: estimating policy adoption diffusion across states or municipalities.
- Environmental economics: measuring pollution spillovers across jurisdictions with shared airsheds or watersheds.
How it works
How it works
The outcome vector y is modeled as a linear function of its own spatially lagged values Wy (neighbors' outcomes), the covariate matrix X, and an iid normal error. The scalar ρ captures the strength of spatial dependence; ρ = 0 collapses the model to ordinary least squares (OLS).
Formula
y = \rho W y + X\beta + \varepsilon,\quad \varepsilon \sim N(0,\sigma^2 I)
Priors are placed on the coefficient vector β, the error precision σ⁻², and the spatial parameter ρ. The stated specification uses a flat prior on β, a Gamma prior on σ⁻² whose hyperparameters a0 and b0 are chosen by the analyst, and a uniform prior on ρ over the interval (−1, 1). That interval is the working parameter space of the specification, but the admissible range of ρ depends on the chosen weights matrix W. The inverse (I − ρW)⁻¹ used in the impact calculation exists only where I − ρW is nonsingular, so the analyst should check the admissible range against W before relying on the uniform prior. Informative priors can replace these choices, for example to concentrate ρ on a range the analyst considers plausible within the admissible set.
Formula
p(\beta) \propto 1,\quad \sigma^{-2} \sim \text{Gamma}(a_0, b_0),\quad p(\rho) \propto 1_{(-1,1)}Bayes' theorem combines the likelihood with the priors to give the joint posterior over all parameters. Because ρ enters the model through the simultaneous structure, the likelihood contains the Jacobian term |I − ρW|, which must be recomputed whenever ρ changes. Computing this term from the eigenvalues of W is a common way to make the calculation efficient.
Formula
p(\rho, \beta, \sigma^2 \mid y) \propto p(y \mid \rho,\beta,\sigma^2)\, p(\beta)\, p(\sigma^{-2})\, p(\rho)The joint posterior has no closed form, so posterior draws are obtained by Markov chain Monte Carlo (MCMC). Following LeSage (1997), the sampler is Gibbs-type: each block is drawn in turn from its full conditional distribution. Given ρ and y, the coefficients are normal, β | ρ, σ⁻², y ~ N(β̂(ρ), σ²(X′X)⁻¹), where β̂(ρ) = (X′X)⁻¹X′(I − ρW)y. Given β and ρ, the error precision has a Gamma conditional in the shape–rate parameterization, σ⁻² | β, ρ, y ~ Gamma(a0 + n/2, b0 + e(ρ)′e(ρ)/2), where e(ρ) = (I − ρW)y − Xβ. The conditional for ρ has no standard form because it contains the Jacobian term. Its density is proportional to |I − ρW| exp{−e(ρ)′e(ρ)/(2σ²)} over the admissible range, so ρ is updated with a Metropolis step: a candidate ρ* is accepted with probability min{1, π(ρ*)/π(ρ)}, where π(ρ) denotes this unnormalized density. In practice the log-determinant ln|I − ρW| is evaluated from the eigenvalues of W, which avoids repeated determinant computations of a large matrix. Posterior means and credible intervals then serve as summaries in place of point estimates and confidence intervals.
Because ρWy appears on the right-hand side, a change in a covariate affects the outcome of the same unit directly and the outcomes of other units through the feedback loop. The coefficient β_k alone is therefore not the marginal effect. The average total impact is given by ι′(I − ρ̂W)⁻¹X_kβ_k/n. Its size depends on ρ, on W and on β_k, so it is not in general equal to β_k. The split into direct and indirect (spillover) effects is presented in the LeSage and Pace (2009) textbook.
Formula
\text{Total impact} = \iota^{\top}(I - \hat{\rho}W)^{-1}X_k \beta_k / nCommon pitfalls
- Confusing spatial lag dependence (outcome spillovers) with spatial error dependence (correlated disturbances). Misspecifying the dependence structure biases the estimates, so a Lagrange multiplier test or a model comparison should be run before choosing the specification.
- Reporting the coefficient β_k as the marginal effect and ignoring the feedback through Wy. In the SAR model the marginal effect is the total impact given above, which generally differs from β_k; whether it is larger or smaller depends on the signs and sizes of ρ and β_k and on the structure of W.
- Treating ρ as directly comparable across datasets or across different W specifications. The value of ρ is tied to the chosen weights matrix, including its row standardization.
- Declaring convergence from a short run. Inspect trace plots, check effective sample size and use the Gelman-Rubin statistic before reporting posterior summaries.
- Applying the model to non-areal data, such as point patterns or continuous surfaces, without first aggregating to areal units or moving to a geostatistical (kriging) framework.
Frequently asked questions
How is the Bayesian Spatial Lag Model different from running OLS on spatially autocorrelated data?
OLS ignores the simultaneity created by Wy on the right-hand side. When ρ is non-zero, OLS estimates are biased and inconsistent, and they do not capture the feedback loop when marginal effects are computed. The Bayesian SAR model treats the spatial lag as part of the simultaneous system and gives posterior distributions for β and ρ that account for it.
How do I choose the spatial weights matrix W?
Common choices are contiguity matrices (queen or rook adjacency) for areal units, or inverse-distance matrices for point locations. The specification should reflect the mechanism of interaction being modeled. Re-estimating under several plausible W matrices is good practice; large changes in ρ across them indicate that the result is fragile.
What is the difference between direct and indirect impacts?
The direct impact is the average effect of a covariate on a unit's own outcome, including the feedback through neighbors. The indirect (spillover) impact is the average effect on the outcomes of the other units. The total impact is their sum. Reporting β_k alone as the marginal effect ignores the feedback, and it can understate or overstate the full response depending on ρ, W and β_k.
How many MCMC iterations are needed?
No fixed number of iterations works for every dataset. Burn-in and retained draws should be chosen so that trace plots have settled, the effective sample size is adequate, and the Gelman-Rubin statistic indicates agreement across chains. Posterior summaries should be reported only after these checks.
When should I prefer the Bayesian Spatial Error Model instead?
Prefer the Spatial Error Model when spatial autocorrelation appears in the residuals of a non-spatial regression, but the outcome of one unit is not thought to directly affect outcomes in neighboring units. In that case the dependence reflects omitted spatially correlated factors rather than genuine spillovers. Lagrange multiplier tests from the frequentist literature, or model comparison criteria such as DIC or WAIC in the Bayesian setting, can help guide the choice.
Related methods
Sources
LeSage, J. P., & Pace, R. K. (2009). Introduction to Spatial Econometrics. CRC Press / Taylor & Francis.
ISBN: 978-1420064247LeSage, J. P. (1997). Bayesian Estimation of Spatial Autoregressive Models. International Regional Science Review, 20(1-2), 113-129.
Open DOI reference