Vera compares contiguity, distance-band, and k-nearest-neighbour constructions, showing that each W encodes a different spatial mechanism. The lesson establishes the choice logic before the note covers standardisation, asymmetry, and robustness checks.
The lesson compares common definitions of neighbourhood; theoretical justification and sensitivity checks remain in the full note.
Every spatial statistic — Moran’s I, a spatial lag, a spatial error term — rests on one prior decision: who is whose neighbour? The spatial weights matrix is where you answer it. It is an matrix whose entry encodes how connected unit is to unit , with by convention. Once fixed, the spatial lag is just the (weighted) average of each unit’s neighbours — the object every spatial method actually operates on.
The data do not hand you W. You choose its structure:
- Contiguity. if areas and share a border. Rook contiguity requires a shared edge; Queen also counts a shared corner (so more neighbours). Natural for areal units like districts or census tracts.
- Distance band. if the distance is within a cutoff , else 0. Simple, but the cutoff is delicate: too small and some units become islands with no neighbours; too large and dense areas acquire enormous neighbour sets.
- k-nearest-neighbours. Each unit links to its
kclosest others, guaranteeing exactlykneighbours everywhere. Robust when density is uneven (a crowded centre, a sparse edge), at the cost of being asymmetric by construction —ican be a neighbour ofjwithout the reverse.
Then row-standardise: divide each row by its sum so . Now is a true average — comparable across units with different neighbour counts — and the spatial parameters (, ) land in an interpretable, bounded range. This is standard for both Moran’s I and spatial regression.
The point to internalise: W is a modelling assumption, not a measurement. It is exogenous and pre-specified — you do not estimate it from the outcome y. And it has teeth: a denser W generally inflates measured autocorrelation, and a badly chosen W can flip the diagnostic tests that decide which spatial model you fit. So the discipline is:
- Pick a structure with a substantive rationale — why these neighbours?
- Fix it before looking at results, so you can’t tune
Wtoward a wanted answer. - Re-run the analysis over alternative
W(differentk, rook vs queen, other cutoffs) and report whether the conclusions survive.
If the story only holds for one hand-picked weighting, it is a story about your W, not about space.