- Introduced by
- Anselin, LeSage, Pace and colleagues in spatial econometrics
- Year
- 1990s–2000s
- Type
- Spatio-temporal regression model
- Family
- GIS / spatial
What does it do?
Space-Time Spatial Regression is a panel regression framework for georeferenced units observed over several time periods.
It adds a spatial weights matrix to the model so that dependence between neighbouring units, either as a spatial lag of the outcome or as spatially correlated errors, is estimated alongside the covariate effects. Time and unit fixed effects absorb common shocks and time-invariant heterogeneity. The model captures spatial dependence within each period, together with common time effects. It does not model persistence or lagged spatial effects over time; a dynamic spatial panel model is needed for that. Under correct specification, the ML and GMM estimators are consistent, but the estimates depend on the chosen weights matrix.
The intuition behind the method
Consider a panel of many counties observed over many years. Neighbouring counties often move together, so a shock in one can spread to adjacent areas. A standard panel regression that ignores this spillover attributes part of the spread to the included covariates, which biases coefficients and distorts standard errors. The spatial lag form adds a term for the weighted outcome of neighbours, and the spatial error form models correlated residuals across neighbours. Time fixed effects remove common year-to-year shocks. The estimated effect of a covariate then has a direct part (its effect on the same unit) and an indirect part (the portion that reaches neighbours through the spatial multiplier).
History
The regression framework for spatial dependence in cross-sectional data was systematized by Anselin, and its extension to panel data developed in the 1990s and 2000s as georeferenced panel datasets became available. Anselin, Le Gallo and Jayet (2008) treat spatial panel econometrics as a distinct topic. LeSage and Pace (2009) set out the spatial lag, spatial error and Spatial Durbin models and the decomposition into direct and indirect effects.
When to use it
Choose this model when the outcome is measured for georeferenced units over several periods and there is evidence that values cluster geographically, for example when Lagrange Multiplier tests on the residuals of a fixed-effects OLS fit show significant spatial dependence. It suits questions where spillovers between neighbouring units matter and the spatial structure can be defined on substantive grounds, such as contiguity or distance. Do not use it when Moran's I or the LM tests on OLS residuals show no spatial dependence, when the spatial structure is arbitrary or unknown, or when only a few spatial units are available, since the spatial parameters are then poorly identified. It is also not the right tool when the central question concerns persistence over time, because the specification contains no lagged outcome term; a dynamic spatial panel model would be needed. Categorical or count outcomes call for spatial extensions of logit or count models. Decision sequence: choose between fixed and random effects with a Hausman-type test; if both LM-lag and LM-error are significant, compare the robust LM variants; if the robust tests point to both forms, consider the Spatial Durbin model.
Limitations and considerations
- Results depend on the weights matrix W; changing the contiguity rule or the distance threshold can change the estimated spatial parameter and the substantive conclusions.
- Full ML requires operations on an N×N matrix at each iteration, so computation becomes costly as the number of units grows.
- Direct and indirect effects are nonlinear functions of the spatial parameter, and they are often omitted or misreported in applied work.
- The model assumes one weights matrix for all periods, which may misrepresent networks whose links change over time.
- With short panels, the variance of the spatial parameters can be imprecise, so inference on ρ and λ should be cautious.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Models spatial spillovers and fixed effects in one specification, which can reduce bias from unmodelled spillovers when the weights matrix reflects the true dependence; results remain sensitive to W and to other omitted variables.
- The spatial lag, spatial error and Spatial Durbin variants correspond to different spillover mechanisms, so the choice between them can be tested rather than assumed.
- The spatial multiplier decomposes a covariate's total effect into direct and indirect parts, showing how much of the effect reaches neighbouring units.
- Compatible with panel fixed and random effects, allowing control for unobserved unit-level heterogeneity.
- ML and GMM estimators are implemented in R (splm, spatialreg), Python (PySAL) and Stata (spxtregress).
Applications
- Regional economics: modeling GDP growth spillovers across provinces or countries over time.
- Epidemiology: tracking the spread of infectious disease across geographic units by period.
- Environmental economics: estimating pollution externalities that diffuse across neighboring jurisdictions.
- Real estate: explaining house price dynamics accounting for neighborhood spillovers and temporal trends.
- Political science: analyzing vote-share contagion across districts in repeated election cycles.
- Transportation planning: modeling traffic volume interdependencies across road network segments over time.
How it works
How it works
Organize the data as a balanced or unbalanced panel: N spatial units (regions, counties, grid cells), each observed at T time points. Each observation carries geographic coordinates or polygon identifiers, which are used to define spatial neighbours.
Construct an N×N spatial weights matrix W that encodes proximity among units, typically by contiguity (queen or rook) or by distance decay. Row-standardize W (w_ij = c_ij / Σ_k c_ik) so that each row sums to one; the spatially lagged variable then becomes a weighted average of each unit's neighbours.
Formula
w_{ij} = \frac{c_{ij}}{\sum_{k} c_{ik}}With observations stacked by period, the spatial lag form is y = ρ(I_T ⊗ W)y + Xβ + u, so the same W is applied within every period. The Spatial Durbin variant adds a spatial lag of the covariates X. If the weights vary over time, the notation must be extended accordingly. Time fixed effects or unit fixed effects are added to X or removed by transformation to absorb unobserved heterogeneity.
Formula
y = \rho (I_T \otimes W) y + X\beta + u
In the spatial error form, y = Xβ + u with u = λ(I_T ⊗ W)u + ε, the residuals follow a spatial autoregressive process with parameter λ. In the spatial lag form the errors are independent and identically distributed. Mixed models (SARAR) allow both ρ and λ to be nonzero.
Formula
u = \lambda (I_T \otimes W) u + \varepsilon
Estimate by Maximum Likelihood (ML) or Generalized Method of Moments (GMM). ML is the standard choice when N is moderate. GMM or quasi-ML is preferred for large N, or when instruments for the spatially lagged dependent variable are available. Fixed effects are removed by a within (or time-demeaning) transformation before the likelihood is maximized, or are estimated jointly, depending on the software.
After estimation, test the residuals for remaining spatial autocorrelation with the LM spatial lag and LM spatial error tests, and check for cross-sectional dependence with the Pesaran CD test. Examine whether the spatial effects are stable across time periods. Moran's I computed on residuals period by period can indicate model misspecification.
Common pitfalls
- Choosing W by convention (for example, always queen contiguity) without re-estimating under alternative weight definitions.
- Reporting only the coefficient on X. In a spatial lag model the total effect of X is the sum of direct and indirect parts, and these can differ substantially.
- Skipping the Pesaran CD test. Common shocks not removed by time effects can look like spatial autocorrelation.
- Choosing between the spatial lag and spatial error forms by inspection rather than with LM tests on the residuals of an OLS fit with fixed effects.
- Comparing estimates of ρ across different W definitions without stating the weighting scheme. Row-standardization changes the scale of ρ and of the spillover magnitudes, so the scheme must be reported and held constant when comparing models.
Frequently asked questions
How do I choose between the spatial lag and spatial error model?
Run OLS on the panel (with fixed effects) and apply the Lagrange Multiplier (LM) tests for spatial lag and spatial error dependence to the residuals. If LM-lag is more significant, prefer the spatial lag model; if LM-error dominates, use the spatial error model. When both are significant, compare the Robust LM variants; if they point to both forms, consider the Spatial Durbin model.
What is the difference between direct and indirect effects?
In a spatial lag model, the effects of covariate k are given by the matrix (I − ρW)^-1 multiplied by β_k. The direct effect is the average of its diagonal elements (the effect of a unit's own covariate change on its own outcome, including feedback through neighbours). The indirect effect is the average of the off-diagonal row sums (the effect reaching other units). The total effect is their sum. The direct effect therefore differs from β, and the relative size of direct and indirect effects depends on ρ and W and is not fixed in advance.
Can I use time-fixed effects together with spatial dependence?
Yes. Time-fixed effects absorb common temporal shocks (e.g., a global recession) and are routinely included alongside the spatial weight structure. Unit fixed effects absorb time-invariant unobserved heterogeneity. Both can be combined, though the spatial parameter must still be estimated via ML or GMM.
How sensitive are results to the choice of spatial weights matrix W?
Results can vary with the W specification. Best practice is to re-estimate the model under two or three alternative W definitions (e.g., queen contiguity, distance bands, k-nearest neighbors) and report whether the main substantive conclusions hold. Large changes suggest the spatial structure is poorly identified.
What software implements space-time spatial regression?
In R, the splm package (built on spatialreg) provides spatial panel ML and GMM estimation; plm is used only for the panel data structure. Python's PySAL includes spreg for spatial econometrics. Stata 15+ offers the spxtregress command for spatial panel data.
Related methods
Sources
LeSage, J. P., & Pace, R. K. (2009). Introduction to Spatial Econometrics. CRC Press / Taylor & Francis.
ISBN: 978-1420064247Anselin, L., Le Gallo, J., & Jayet, H. (2008). Spatial Panel Econometrics. In L. Matyas & P. Sevestre (Eds.), The Econometrics of Panel Data (pp. 625-660). Springer.
Open publication reference