W row-standardised; B binary; C \(n^* g/D\); U \(g/D\); minmax
\(g/\min(\max rowsum, \max colsum)\) (Kelejian and Prucha 2010); S
\(n (g_{ij}/q_i)/Q\), \(q_i = \sqrt{\sum_j g_{ij}^2}\) (Tiefelsdorf,
Griffith and Boots 1999), with \(n^*\) the units having neighbours and
\(D\) the weight sum. Identical to the Python arm
morie.fn.swutil.weights_style.
Usage
WeightsStyle(W, style = "W")
Arguments
- W
Square weights matrix.
- style
One of W, B, C, U, minmax, S.
References
Tiefelsdorf, M., Griffith, D. A. and Boots, B. (1999). A
variance-stabilizing coding scheme for spatial link matrices.
Environment and Planning A 31, 165-180.
Examples
WeightsStyle(rbind(c(0, 1, 1), c(1, 0, 0), c(1, 0, 0)), "W")
#> [,1] [,2] [,3]
#> [1,] 0 0.5 0.5
#> [2,] 1 0.0 0.0
#> [3,] 1 0.0 0.0