- Introduced by
- Anselin (1988); extended to panels by Elhorst (2003, 2014)
- Year
- 1988 / 2003
- Type
- Spatial econometric panel model
- Family
- GIS / spatial
What does it do?
The Panel Spatial Error Model (panel SEM) extends the spatial error model to panel data, so that spatial dependence enters through the error term of georeferenced units observed over several time periods.
It captures spatially correlated unobserved factors without assuming that the outcome of one unit directly affects the outcomes of its neighbours.
The intuition behind the method
Suppose you model regional unemployment rates over several years. Neighbouring regions may share unobserved features, such as common shocks, similar infrastructure or institutional ties, that make their residuals correlated even after the measured covariates are included. The panel SEM places this dependence in the error term: the error of one region is linked to the errors of its neighbours through a spatial weights matrix. If this dependence is real and left out, the reported standard errors of the covariate effects cannot be relied on. Including it models the residual correlation explicitly, so the covariate coefficients are estimated with the error structure taken into account.
History
The spatial error model is associated with Luc Anselin's 1988 book Spatial Econometrics: Methods and Models. Its extension to panel data is developed in the work of J. P. Elhorst, cited on this page through his 2014 Springer book, Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. The model is used in regional science, urban economics and environmental economics to handle spatially correlated unobservables.
When to use it
Choose the panel SEM when you have repeated observations on georeferenced units (regions, countries, cities) and suspect that unobserved, spatially clustered factors are correlated across neighbouring units, rather than that one unit's outcome directly affects its neighbours. It is a candidate when residual spatial dependence is present, the LM-Error test is significant, and the robust LM-Error test remains significant while the robust LM-Lag test does not. Do not use it when theory predicts direct spillovers in the outcome; the Panel Spatial Lag Model or a Durbin-type model is then the better starting point. Be cautious when the spatial weights cannot be justified, when the panel is strongly unbalanced, or when the number of cross-sectional units is small.
Limitations and considerations
- Does not model substantive spatial spillovers in the dependent variable; if such spillovers exist, a spatial lag or Durbin model is more appropriate.
- The specification of the spatial weights matrix W is critical and is often a judgement call; results can be sensitive to the chosen connectivity structure.
- With large N and T, ML estimation becomes computationally intensive; sparse matrix techniques or GMM alternatives may be needed.
- The random-effects version is consistent only if the individual effects are uncorrelated with the regressors. When they are correlated, fixed effects are the standard choice, and the Hausman test guides the decision. A Mundlak-type correction is one possible alternative.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Addresses spatially correlated disturbances, which otherwise make the reported standard errors of covariate effects unreliable.
- Extends to panel data, so unit fixed effects and time effects can be included alongside the spatial error term.
- The parameter λ measures the strength of spatial error correlation and does not imply behavioural spillovers, so the error dependence is interpreted separately from the outcome.
- Covariate coefficients keep their direct regression interpretation, because spatial dependence sits in the disturbances rather than in a spatial lag of the outcome.
- GM estimation is a less computationally demanding route than full ML when the panel is large.
Applications
- Regional economic convergence studies where neighboring regions share unobserved productivity shocks.
- Environmental epidemiology modeling disease rates across counties with spatially correlated unmeasured risk factors.
- Housing market analysis across neighborhoods over time, controlling for spatially clustered omitted amenities.
- Agricultural yield panel models where soil quality and climate spillovers create correlated residuals across nearby plots.
- Political science analyses of voting behavior across districts over election cycles with spatially correlated media exposure.
- Urban planning studies examining land-use change over time where unobserved local governance factors cluster spatially.
How it works
How it works
The panel outcome y for unit i at time t is modelled as a linear function of covariates X and an error term u. Unit-specific and time-specific effects can be included, either as fixed effects or as random effects, to account for heterogeneity that is constant over units or over periods.
Formula
y_{it} = X_{it}\beta + u_{it}The error term follows a spatial autoregressive process, u = λWu + ε, where W is the spatial weights matrix, λ is the spatial error parameter, and ε is assumed to be independent and identically distributed. Because each unit's disturbance depends on its neighbours' disturbances, a significant λ indicates spatially correlated disturbances. In the panel setting, the spatial process can be placed in the remainder error alone, as in the specification above, or also in the individual random effects, as in the specification of Kapoor, Kelejian and Prucha (2007). The two choices imply different variance-covariance structures for the composite disturbance and different spillover mechanisms. When only the time-varying remainder is spatially correlated, only the time-varying components diffuse spatially. In the Kapoor et al. specification, spatial spillovers also have a permanent component.
Formula
u_{it} = \lambda W u_{it} + \varepsilon_{it}The spatial weights matrix W encodes connectivity among units, for example queen contiguity, k-nearest neighbours or inverse distance. Row standardisation makes each row sum to one, which helps keep λ comparable across specifications that use different weights.
Parameters are typically estimated by maximum likelihood (ML) or by generalised method of moments (GM/GMM). The parameter λ is identified from the spatial structure of the residuals. The Hausman test is used to choose between fixed- and random-effects specifications: if unit effects are correlated with the regressors, the random-effects estimator is inconsistent.
Diagnostics include Lagrange multiplier (LM) tests for residual spatial dependence, robust LM tests that help distinguish spatial error dependence from spatial lag dependence, and Moran's I computed on the panel residuals.
Common pitfalls
- Treating a significant λ as evidence of substantive spillovers. It indicates correlated disturbances, not behavioural interaction.
- Choosing the spatial weights matrix arbitrarily, without theoretical or empirical justification, which can produce fragile estimates.
- Skipping the LM diagnostics and applying the panel SEM by default, when panel OLS or a spatial lag model may be more appropriate.
- Ignoring heteroskedasticity across spatial units. If the error variance differs across regions, ML inference can be distorted, and heteroskedasticity-robust alternatives should be considered.
Frequently asked questions
How does the Panel Spatial Error Model differ from the Panel Spatial Lag Model?
In the Panel Spatial Lag Model, the outcome of neighbouring units enters directly as a regressor (Wy), which models behavioural spillovers. In the Panel Spatial Error Model, spatial dependence is confined to the error term (u = λWu + ε), which captures shared unobserved factors rather than direct spillovers in the outcome.
How do I choose between fixed effects and random effects in the panel SEM?
Apply the Hausman test to the panel SEM estimates. If unit-specific effects are correlated with the regressors, fixed effects are required, because the random-effects estimator is inconsistent in that case. If the test does not reject, the random-effects estimator is efficient under its assumptions.
Which software can estimate the Panel Spatial Error Model?
Panel SEM estimation is available in several spatial econometrics software packages, but the options differ. Before relying on a package, check whether it offers the estimator (ML or GM) and the fixed- or random-effects specification you need, and whether it handles your panel structure. The StatWise route for this method is linked on this page; confirm its options in its documentation.
What if my LM-Error and LM-Lag tests both reject the non-spatial model?
Use the robust versions of the LM tests (robust LM-Error and robust LM-Lag). The one that remains significant after robustification points to the appropriate model. If both remain significant, a more general specification such as the Panel Spatial Durbin Model may be considered; see the related entries.
Can the spatial weights matrix change over time in a panel SEM?
The standard panel SEM assumes a time-invariant W. Allowing connectivity to change across periods departs from the standard specification. It requires a theoretical justification for why connectivity itself evolves, and it is not part of the standard estimators described on this page.
Related methods
Sources
Elhorst, J. P. (2014). Spatial Econometrics: From Cross-Sectional Data to Spatial Panels. Springer.
ISBN: 978-3642403408Anselin, L. (1988). Spatial Econometrics: Methods and Models. Kluwer Academic Publishers.
ISBN: 978-9024737291Panel Data Econometrics with R, sec. 10.3.2.2 (Spatially Correlated Random Effects)