MerQuR+Statistics Glossary

Statistics Glossary → SAR (Spatial Autoregressive Lag)

SAR (Spatial Autoregressive Lag)analysis

A spatial regression model for situations where the outcome in one area is also affected by the outcomes in neighbouring areas, estimating this spillover (spatial lag) together with the effects of the explanatory variables.

Concept

In data collected for spatial units such as neighbourhoods, districts or provinces, neighbouring units resemble one another: house prices in one neighbourhood may be influenced by prices in the surrounding ones, and a district's crime rate by that of neighbouring districts. Ordinary regression treats observations as independent, so in this situation it gives biased coefficients and misleading standard errors. The spatial autoregressive lag model (SAR) adds the neighbours' outcome itself to the model as an explanatory variable.

The model is y = ρWy + Xβ + ε. W is the spatial weights matrix defining who is whose neighbour and with what weight; when it is row-standardised, Wy is the neighbours' average outcome for each unit. ρ measures the effect of the neighbours' outcome on a unit's own outcome. When ρ is non-zero, a change in one unit spreads to its neighbours and back again, so the βs are not marginal effects; instead the direct (effect of a unit's own explanatory variable), indirect (effect spilling over to neighbours) and total effects are read. The Spatial Durbin Model (SDM) also adds the neighbours' explanatory variables (WX).

The results are sensitive to how W is defined, so results under different neighbourhood definitions should be compared. The model is usually chosen with spatial autocorrelation in the OLS residuals (Moran's I) and Lagrange multiplier (LM) tests: is the dependence stronger in the outcome (lag, SAR) or in the error term (error model, SEM)? The model assumes the relationship is the same across the whole area; if the relationship itself varies from place to place, other methods are needed.

When to use it

  • When the outcome in spatial units is genuinely thought to be influenced by the outcome in neighbouring units (house prices spreading, an epidemic passing into neighbouring regions, local governments following each other's tax rates).
  • If the spatial dependence comes from unmeasured shared regional factors and collects in the error term, the spatial error model (SEM) is preferred; if the neighbours' explanatory variables also matter, the Spatial Durbin Model (SDM).
  • If the effects of the explanatory variables themselves vary from region to region, geographically weighted regression (GWR) is used.

An everyday example

A municipality wants to explain the average rent in 60 neighbourhoods by distance to the centre and share of green space. When rents rise in one neighbourhood, landlords in neighbouring ones may tend to raise theirs too. If the SAR model finds ρ = 0.45, the neighbours' rents clearly affect a neighbourhood's own rent. Then the effect of opening a new park in one neighbourhood is not confined to it; the indirect effect shows the change in rents that spills over to the neighbouring neighbourhoods.

Parameters in MerQur

Dependent variable, Predictors (X), Latitude, Longitude

Concept: The dependent and explanatory variables are as in ordinary regression; the coordinates give each unit's location, and who neighbours whom is computed from these locations.

Everyday example: In the rent example, the dependent variable is average rent and the explanatory variables are distance to the centre and share of green space. The latitude and longitude of each neighbourhood's centre are used to build the neighbourhoods.

What it does: Selects the variables of the model and the point coordinates.

Effect on the result: All estimates depend on the selected model and on the coordinates (for k-NN and distance-based neighbourhoods).

On the validation data: Columbus: CRIME ~ HOVAL + INC.

Neighbourhood method (k-NN / Distance band / Distance band with user threshold (binary) / Inverse distance 1/d / External weights file)

Concept: The spatial weights matrix W defines which units each unit counts as neighbours and what weight it gives them. Neighbourhoods can be built from the k nearest units, from units within a given distance, from weights that decline with distance or from a ready-made file; all results of the model depend on this definition.

Everyday example: One can say 'the 5 nearest neighbourhoods are neighbours' or 'all neighbourhoods within 2 km are neighbours'. With a distance band, densely packed central neighbourhoods get many neighbours and sparse outer ones few; with k nearest neighbours everyone has the same number.

What it does: Determines who is counted as a neighbour in the W matrix and its weight.

Effect on the result: ρ, β, standard errors, LM tests and all the effects are conditional on W.

On the validation data: Columbus: k-NN (k = 5) ρ = 0.4649 (logL -180.32); automatic distance band (threshold 3.374) ρ = 0.5014 (logL -179.06); 1/d within the threshold ρ = 0.5169 (logL -178.30); Anselin neighbourhood file (.gal) ρ = 0.4233 (logL -182.67).

→ Spatial weights matrix (W)

k (for k-NN)

Concept: In the k-nearest-neighbour method, sets how many neighbours each unit has. A small k reflects only very close interaction, a large k the average of a wider surrounding area.

Everyday example: With k = 3, a neighbourhood's rent is linked only to the three adjoining neighbourhoods; with k = 10, a wider part of the district counts as 'neighbours'. Seeing how ρ changes with k shows how sensitive the result is to the neighbourhood definition.

What it does: The number of neighbours of each unit; active only in k-NN.

Effect on the result: ρ and SE change.

On the validation data: ρ = 0.4530 for k = 2, 0.4649 for k = 5, 0.5278 for k = 10 (SE 0.098; 0.115; 0.170). k = 50 raises an error because it exceeds the number of observations (n = 49) ("k can be at most 48").

→ Spatial weights matrix (W)

Distance threshold (coordinate units)

Concept: In the distance-band methods, the neighbourhood radius: units within this distance count as neighbours. If the threshold is too small, some units have no neighbours at all; if too large, distant units count as neighbours too and the local effect is diluted.

Everyday example: With a 1 km threshold, some sparse outer neighbourhoods may have no neighbours. With 10 km, almost the whole city neighbours itself and spillover between neighbourhoods cannot be distinguished.

What it does: The neighbourhood radius in the distance band and 1/d methods (km for great circle). If 0 is entered, the smallest threshold at which every unit has at least one neighbour is used.

Effect on the result: W and therefore all estimates change. It has no effect when k-NN is selected (the field is disabled).

On the validation data: ρ = 0.4099 for threshold 6, 0.3754 for threshold 10 (p = 0.163, not significant); with 1/d, ρ = 0.6023 for threshold 10. In Boston, with great circle and a 2 km threshold, 28 units without neighbours arise (MerQur gives a warning note).

→ Spatial weights matrix (W)

Weights file (.gal / .gwt)

Concept: Neighbourhood relations can also be read from a file prepared in a geographic information system. This allows definitions such as shared borders (contiguity), which cannot be built from coordinates alone.

Everyday example: If the municipality's GIS unit has prepared a file that treats neighbourhoods sharing a border as neighbours, it is loaded directly. If a river separates two neighbourhoods, they can be kept from counting as neighbours even though they are close.

What it does: Reads W from a GAL or GWT file; identifiers are mapped to the order number 0..n-1 or 1..n. In .gwt files the third column is used as the weight.

Effect on the result: The whole model changes.

On the validation data: With Anselin columbus.gal, ρ = 0.423325. Example 32.1 W (.gwt): ρ = 0.431020, logL = -182.38860, AIC = 374.77720. baltim_q.gal: ρ = 0.425885, logL = -832.937174.

→ Spatial weights matrix (W)

Model (SAR / Spatial Durbin SDM)

Concept: SAR adds only the neighbours' outcome; the Spatial Durbin Model (SDM) also adds the neighbours' explanatory variables. Likelihood ratio tests check whether the SDM can be reduced to the simpler SAR or error model.

Everyday example: A neighbourhood's rent may depend not only on the neighbours' rents but also on green space in neighbouring areas, if a big park next door is within walking distance. The SDM estimates this 'neighbour's park' effect as a separate coefficient.

What it does: SDM adds the spatial lag of the explanatory variables (WX); likelihood-ratio tests of SDM-SAR (θ = 0) and SDM-SEM (common factor) and an LR test against SLX for ρ are given.

Effect on the result: Coefficients, effects and LR tests change.

On the validation data: With the Example 32.1 W, SDM ρ = 0.426492, θ = -0.519640 / 0.245716, logL = -181.39141, AIC = 376.78282. Columbus .gal: LR SDM-SAR = 2.069 (p = 0.355), SDM-SEM = 4.220 (p = 0.121).

→ Spatial lag and spatial Durbin models (SAR, SDM, SDEM)

W standardisation (W row / B binary / C global / U unit sum / S variance-stabilising)

Concept: Sets the scale of W. With row standardisation the weights in each row sum to 1 and Wy is the neighbours' average; with binary weights Wy is the neighbours' sum. When the scale changes, the numerical value and reading of ρ change.

Everyday example: With a row-standardised W, ρ = 0.45 reads as 'if the neighbours' average rent is 100 TL higher, this has a direct effect of about 45 TL' (the feedback from the spillover adds to this). With a binary W, the same relationship is expressed by a ρ divided by the number of neighbours.

What it does: Determines the scale of W: W (row sum 1), B (binary), C (sum n), U (sum 1), S (Tiefelsdorf variance-stabilising). MerQur divides W by the largest eigenvalue and converts ρ back to the original scale; B, C and U are different scales of the same model.

Effect on the result: The scale of ρ and, for a W that is not row-standardised, the effects change; logL does not change in B/C/U.

On the validation data: With .gal, ρ: W 0.4233, B 0.0485, C 0.2337, U 11.4535, S 0.3402; logL: -181.711 in B, C and U, -182.674 in W. Total effect HOVAL: -0.3294 for a W that is not row-standardised, -0.4618 in W.

→ Spatial weights matrix (W)

Distance metric (Euclidean / Great circle)

Concept: Euclidean distance is the straight-line distance on a flat map and is used with projected coordinates; great-circle distance accounts for the Earth's curvature and is needed for latitude-longitude degrees.

Everyday example: For the neighbourhoods of one city both distances give almost the same result. Over a wide area such as Turkey's 81 provinces, with coordinates in degrees, great-circle distance should be chosen.

What it does: Euclidean distance in coordinate units or great-circle distance (haversine, Earth radius 6371 km; coordinates in degrees).

Effect on the result: The k-NN neighbours and the distance threshold change.

On the validation data: Boston, k = 5: Euclidean ρ = 0.5798 (logL -1477.78); great circle ρ = 0.5788 (logL -1470.41).

→ Distance measure (Euclidean, Manhattan, Gower, great-circle)

Estimation method (ML full eigenvalues / ML sparse LU / ML Ord eigenvalues / GMM-S2SLS / GMM-S2SLS White robust SE)

Concept: Maximum likelihood estimation assumes normally distributed errors and usually gives the most efficient result. The generalised method of moments (GMM/S2SLS) handles the endogeneity of Wy with instrumental variables and does not require normality; the White option gives standard errors robust to heteroskedasticity.

Everyday example: If rents are roughly normally distributed, ML is suitable. If rents in some upmarket neighbourhoods are very scattered and the heteroskedasticity test is significant, S2SLS with robust standard errors gives a more reliable estimate of uncertainty.

What it does: The first three are maximum likelihood estimation with the exact log-determinant (LU for large n); S2SLS is the method of Kelejian and Prucha (1998) (instruments X, WX, W²X); the White option gives a robust SE.

Effect on the result: The ML methods give the same estimate; S2SLS gives a different ρ and SE. If S2SLS is selected with SDM, ML is used and a note is written.

On the validation data: With .gal, in the three ML methods ρ = 0.4233, SE = 0.1195. S2SLS ρ = 0.4615 (SE 0.1879), White SE 0.1448; σ² is e'e/(n-k) = 104.665 in both options.

→ Maximum likelihood (ML) estimation

OLS assumption diagnostics (Extra output)

Concept: Checks the residuals of ordinary regression before moving to the spatial model: Jarque-Bera tests normality, Breusch-Pagan and Koenker-Bassett test heteroskedasticity, and the condition number and VIF test multicollinearity among the explanatory variables.

Everyday example: If the Breusch-Pagan test is significant, rents deviate from the model much more in some neighbourhoods. High VIF values mean, for example, that distance to the centre and green-space share are closely tied and their effects are hard to separate.

What it does: Jarque-Bera, Breusch-Pagan, Koenker-Bassett, condition number and VIF on the OLS residuals.

Effect on the result: Only adds output.

On the validation data: Columbus (k = 5): Jarque-Bera 1.8358 (p = 0.3994), Breusch-Pagan 10.0128 (p = 0.006695), Koenker-Bassett 7.2166 (p = 0.0271), Belsley condition number 6.542, VIF HOVAL = INC = 1.333.

→ Ordinary least squares (OLS)

Confidence Level (%90 / %95 / %99 / Other, custom value)

Concept: Sets the confidence level of the interval estimates for the coefficients, ρ, and the direct, indirect and total effects.

Everyday example: If the 95% confidence interval for ρ is [0.25, 0.65], the effect of neighbouring rents is probably moderate and not zero; at 99% the interval widens.

What it does: The level of the Wald z confidence interval for β, ρ and the effects.

Effect on the result: Only the interval limits change.

On the validation data: Columbus (k = 5): ρ = 0.4649, SE 0.1155, 95% CI [0.2385, 0.6912].

→ Confidence level and confidence interval

Example on real data

Data: Anselin 1988 Columbus crime data, R spData

Variables: dependent CRIME (crime rate), predictors HOVAL (house value) and INC (income), coordinates Y and X (49 neighbourhoods)

  • Question: In the 49 neighbourhoods of Columbus, how is the crime rate (CRIME) related to house value (HOVAL) and income (INC), and is the crime rate of a neighbourhood influenced by that of its neighbours? (W: 5 nearest neighbours, row-standardised.)
  • Assumption / model choice: The OLS residuals show strong spatial autocorrelation (Moran I = 0.331, z = 4.78, p < .001). LM-lag (15.93) and LM-error (15.19) are both significant; robust LM-lag (3.80, p = .051) is stronger than robust LM-error (3.06, p = .080), so SAR is appropriate.
  • Result: ρ = 0.465 (SE 0.115, z = 4.03, p < .001): crime is also high in a neighbourhood whose neighbours have a high crime rate. House value (β = -0.260, p = .002) and income (β = -0.911, p = .003) reduce crime.
  • Effects: When ρ ≠ 0, the βs are not marginal effects. For a 1-unit increase in income, the direct effect is -0.954, the indirect effect spilling over to neighbours is -0.748 and the total effect is -1.702 (total p = .005); the indirect effects are not significant at the 5% level (HOVAL p = .089, INC p = .065).
  • Model fit: logL = -180.32, AIC = 370.63 (OLS 382.75); LR(ρ = 0) = 14.12, p < .001; pseudo R² = 0.68. The remaining autocorrelation in the model residuals is not significant (Moran I = 0.111, p = .098).
  • Limitation: n = 49 is small; the results are conditional on the choice of W (k-NN, k = 5).
  • APA: SAR (ML, k-NN W, k = 5, N = 49): ρ = 0.46, z = 4.03, p < .001; INC β = -0.91, p = .003; pseudo R² = .68, AIC = 370.63.

Related concepts

Spatial weights matrix (W)Spatial lag and spatial Durbin models (SAR, SDM, SDEM)Two-stage least squares (2SLS) and LIMLOrdinary least squares (OLS)Distance measure (Euclidean, Manhattan, Gower, great-circle)Maximum likelihood (ML) estimationEigenvalue and eigenvectorInstrumental variable and endogeneity

The numbers in the examples are MerQur's output on independent, publicly available validation data; see the MerQur Technical Note for details.