.spatial_validate_W: Validate and normalise a spatial weight matrix
Description
Validate and normalise a spatial weight matrix
Usage
.spatial_validate_W(W, units)
Value
A row-normalised matrix with zero diagonal.
Arguments
- W
A numeric matrix (N x N).
- units
Character vector of unit identifiers in the panel, used
both for dimension checks and for aligning rows/columns.