Computes neighbourhood-based weights for areal (lattice) data based on shortest-path graph distances.
areal_neighbor_weights(i0, adjacency, decay = 1)A numeric vector of length nrow(adjacency) with weights
based on graph distance from i0 (self-weight is 0, i.e. the
target unit is excluded from its own calibration set).
Integer index of the target (unobserved / held-out) areal unit.
A square 0/1 (or weighted) adjacency matrix describing
the neighbourhood structure of the areal units (e.g. a spatial contiguity
matrix). Row/column i0 corresponds to the target unit.
Numeric decay rate applied to graph distance (number of hops)
from i0; larger values down-weight distant neighbours more
aggressively. Defaults to 1.