- Introduced by
- Brunsdon, Fotheringham & Charlton
- Year
- 1996
- Type
- Spatially varying coefficient regression
- Family
- GIS / spatial
What does it do?
Local Spatial Regression fits a separate regression at each location in a study area, so the coefficients of the predictors can differ from place to place.
Instead of one global slope for all observations, it produces a map of local coefficients that shows where and how the relationship between predictors and the outcome changes. The cited sources present this approach as geographically weighted regression, the framework on which this entry is based.
The intuition behind the method
Think of a standard regression as a single pair of glasses applied equally across the whole study area. Local Spatial Regression is closer to a separate calibration at each location: for every target point, observations are weighted by their distance from it, with nearby observations counting most, and a weighted regression yields coefficients that reflect conditions there. Collecting these estimates across the area gives a surface of coefficient values, which can expose spatial variation that a single global coefficient would average away.
History
Brunsdon, Fotheringham and Charlton introduced geographically weighted regression in their 1996 Geographical Analysis paper as a way to explore spatial nonstationarity, and that paper also discusses ways in which the technique can be extended. Fotheringham, Brunsdon and Charlton set out the framework in their 2002 book, which is cited here for the overall framework. The cited works present the method under the name geographically weighted regression; the label 'Local Spatial Regression' is used on this page for the same approach. Later extensions, such as multiscale and generalised linear model versions, are covered in the related entries.
When to use it
Choose Local Spatial Regression when you suspect that the relationship between predictors and the outcome differs by location, a condition known as spatial non-stationarity, and you want to see where those differences lie. It suits georeferenced cross-sectional data in which each observation has a meaningful location, as in the 1991 UK census application described in Brunsdon et al. (1996), which related car ownership rates to social class and male unemployment. The local model assumes that the relationship is approximately linear within each kernel window, that coefficients are roughly constant inside that window, and that coordinates and distances are meaningful and correctly measured. Do not use it when the coordinates are not meaningful, when local neighbourhoods contain too few observations to support a weighted fit for each predictor, or when a single average effect is the goal. Residual spatial autocorrelation is a different problem, and a local model does not by itself address it. Before moving to the local model, fit a global model and run the tests proposed by Brunsdon et al. (1996): Monte Carlo tests of the null hypothesis that a global model describes the data, and tests of whether individual coefficients are stable across geographic space. Move to the local model only if non-stationarity is supported.
Limitations and considerations
- Computationally intensive: a separate weighted regression is fitted at every calibration location, so the cost rises with the number of observations.
- Local estimates can be unstable where predictors are strongly correlated within the local window, which inflates local standard errors.
- Bandwidth selection by cross-validation or AIC depends on the data; outliers can push the choice towards too much or too little smoothing.
- Coefficient surfaces are many correlated maps rather than a single table, so interpretation and presentation require careful spatial analysis skills.
- The model does not directly model dependence in the error term, so residual autocorrelation can remain after fitting.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Estimates how each predictor's effect changes across the study area instead of averaging it, so local coefficient surfaces can suggest spatial variation in effects. Whether that variation exceeds what a global model allows should be tested with Monte Carlo procedures before it is interpreted.
- Produces coefficient maps that can be read spatially, which helps show where effects are strong, weak, or change sign.
- Weights observations by distance through a kernel function, so no contiguity-based spatial weights matrix has to be specified in advance; the bandwidth plays the main tuning role instead.
- Allows the kernel and the bandwidth (fixed or adaptive) to be chosen so that the local window fits the density of observations.
- Can be extended to generalised linear model families such as logistic and Poisson regression for binary or count outcomes.
Applications
- Housing: examining whether the effect of a neighbourhood amenity on property prices differs between parts of a city.
- Public health: checking whether the association between area deprivation and a health outcome varies from one area to another.
- Environmental science: testing whether the relationship between a land-cover variable and a climatic driver changes across a heterogeneous landscape.
- Urban planning: comparing how a transport variable relates to commuting patterns in central and peripheral zones.
- Agricultural geography: examining where soil properties relate most strongly to crop yield.
How it works
How it works
For a target location k, each observation i receives a weight w_i(u_k, v_k) that depends on d_ik, the distance between i and k. A Gaussian kernel is one common choice: the weight falls as distance grows, and the bandwidth b sets how quickly it falls. The formula shown is w = exp(-d²/b²). Software packages can scale the kernel differently, so bandwidth values are not directly comparable across packages, and the parameterisation should be checked before comparing results.
Formula
w_i(u_k, v_k) = \exp\!\left(-\tfrac{d_{ik}^2}{b^2}\right)A weighted least squares problem is solved at each location k using the diagonal weight matrix W_k. The resulting coefficient vector beta-hat(u_k, v_k) gives the locally calibrated effect of each predictor at that point.
Formula
\hat{\beta}(u_k,v_k) = (X^\top W_k X)^{-1} X^\top W_k yThe bandwidth b sets the size of the window: a small value uses few nearby observations and gives noisier estimates, while a large value smooths away spatial variation. It is commonly chosen by minimising a cross-validation score or the Akaike information criterion (AIC) across the calibration points.
After the local problem is solved at every location, each coefficient is mapped across the study area. These coefficient surfaces show where relationships are strong, weak, positive, or negative, revealing spatial non-stationarity that a global model would mask.
Local standard errors come from each local weighted least squares fit, and pseudo-t statistics flag coefficients that look significant at individual locations. Monte Carlo tests address two broader questions: whether the spatial variation in coefficients is larger than a global model would allow, and whether individual coefficients are stable across geographic space.
Common pitfalls
- Skipping a global baseline: test for spatial non-stationarity before interpreting local coefficients, for example with the Monte Carlo procedures in Brunsdon et al. (1996). A Moran test on residuals detects spatial autocorrelation, which is a different condition, so a significant Moran result does not by itself show that coefficients vary over space.
- Treating local coefficients as independent: neighbouring estimates are strongly correlated, so pointwise significance tests overstate the number of independent findings unless corrected for multiple comparisons.
- Ignoring local multicollinearity: predictors may be collinear within parts of the study area even when global collinearity diagnostics look acceptable, which makes individual local coefficients unreliable.
- Mapping sparse areas without a flag: locations with few nearby observations give unreliable estimates, which should be flagged or masked on the map.
- Using a fixed bandwidth where observation density is very uneven: an adaptive bandwidth, defined by nearest-neighbour counts, adjusts to local density.
Frequently asked questions
How does Local Spatial Regression differ from ordinary spatial regression models?
Global spatial models (spatial lag, spatial error, Durbin) fit a single coefficient for each predictor across the entire study area but account for spatial dependence through a weights matrix. Local Spatial Regression instead allows each coefficient to vary by location, prioritising the detection of spatial non-stationarity. The two approaches address different spatial problems and can be combined.
How do I choose the bandwidth?
The most common automatic approach minimises a leave-one-out cross-validation score or an AIC over a range of candidate bandwidths. Adaptive bandwidths (defined by a number of nearest neighbours rather than a fixed distance) are preferred when observation density is uneven across the study area.
Are the local coefficients statistically significant?
Local pseudo-t statistics can be computed, but a coefficient surface consists of many correlated estimates, so individual p-values overstate significance. The Monte Carlo tests proposed by Brunsdon et al. (1996) address spatial non-stationarity and coefficient stability more directly. A correction for multiple comparisons can be considered, but standard corrections assume independent tests and may be misleading for correlated local estimates, so pointwise significance should be interpreted cautiously.
Can I use Local Spatial Regression with a binary or count outcome?
Yes. Geographically Weighted Generalised Linear Models extend the framework to logistic regression (binary outcomes) and Poisson regression (count outcomes) by applying a locally weighted maximum likelihood estimator instead of weighted least squares.
What software supports Local Spatial Regression?
Commonly used tools include the mgwr Python package (multiscale GWR), the GWR4 application, and the GWmodel package in R. This library entry links to a StatWise run page for the method; check that page for the features it currently offers.
Related methods
Sources
Fotheringham, A. S., Brunsdon, C., & Charlton, M. (2002). Geographically Weighted Regression: The Analysis of Spatially Varying Relationships. Wiley.
ISBN: 978-0471496168Brunsdon, C., Fotheringham, A. S., & Charlton, M. (1996). Geographically weighted regression: A method for exploring spatial nonstationarity. Geographical Analysis, 28(4), 281-298.
Open DOI reference