Statistics Glossary → Spatial weights matrix (W)
Spatial weights matrix (W)concept
The n × n matrix that defines, in spatial analysis, which units count as neighbours and how much weight each neighbour relationship carries.
The entry wᵢⱼ in row i, column j of W is the weight of unit j's influence on unit i; the diagonal is zero (a unit is not its own neighbour). Neighbourhood can be defined by shared borders (rook/queen contiguity), the k nearest neighbours, a distance band or inverse distance (1/d), or read from an external file (.gal, .gwt). With row standardisation each row sums to 1, so Wy can be read as the average of the neighbouring values (the spatial lag).
W underlies spatial autocorrelation measures such as Moran's I and regressions such as the SAR and spatial error models. Results can be sensitive to the choice of W, which is usually fixed in advance by the researcher rather than estimated from the data. The choice should therefore be justified theoretically, and it should be checked whether the results change with a few different Ws. 'Island' units with no neighbours within a distance band cause problems. Different standardisations (binary, row, global) change the scale of the model parameter, and interpretation should take that into account.
An everyday example
The average house price of 80 neighbourhoods in a city is studied. If neighbours are defined as 'neighbourhoods sharing a border', a central neighbourhood may have 6 neighbours and one on the edge only 2. With row standardisation each neighbour of the central neighbourhood gets a weight of 1/6 and each neighbour of the edge one 1/2, so each neighbourhood's 'neighbour price' is the average of its neighbours.
In MerQur
In the SAR and spatial error models, the 'Neighbourhood method' (k-NN, Distance band, Distance band with user threshold, Inverse distance 1/d, External weights file), 'k', 'Distance threshold', 'Weights file (.gal / .gwt)' and 'W standardisation' (W row, B binary, C global, U unit sum, S variance-stabilising) options build W. 'K neighbors' in Moran's I and 'Neighbourhood' and 'Distance band (km)' in Getis-Ord Gi* serve the same purpose.
Analyses where this concept appears
SAR (Spatial Autoregressive Lag)Spatial Error Model (SEM)Moran's I (Spatial Autocorrelation)Getis-Ord Gi* Hotspot
Related concepts
Spatial autocorrelation (Moran's I, Geary's C)Spatial lag and spatial Durbin models (SAR, SDM, SDEM)