GridContiguity: queen or rook contiguity of a regular grid, cells
numbered row by row. DistanceBandWeights: d1 < d <= d2
neighbours. KnnWeights: k nearest neighbours (ties to the lower
index). InverseDistanceWeights: d^-power weights.
KernelWeights: fixed or adaptive geographically weighted kernels as
GWmodel::gw.weight. SymmetrizeWeights: union, intersection or
average symmetrisation. WeightsComponents: connected components as
spdep::n.comp.nb. Identical to the Python arm morie.fn.swbuild.
Usage
GridContiguity(nrow, ncol, type = "queen", torus = FALSE)
DistanceBandWeights(coords, d2, d1 = 0)
KnnWeights(coords, k)
InverseDistanceWeights(coords, power = 1, d2 = NULL, row_standardize = FALSE)
KernelWeights(
coords,
bw,
kernel = "bisquare",
adaptive = FALSE,
diagonal = TRUE
)
SymmetrizeWeights(W, method = "union")
WeightsComponents(W)Arguments
- nrow, ncol
Grid dimensions.
- type
"queen"or"rook".- torus
Wrap the grid edges.
- coords
Two-column coordinates.
- d1, d2
Distance band.
- k
Number of neighbours.
- power
Distance decay exponent.
- row_standardize
Row-standardise the weights.
- bw
Bandwidth (distance, or number of points when adaptive).
- kernel
"gaussian","exponential","bisquare","tricube"or"boxcar".- adaptive
Adaptive bandwidth.
- diagonal
Keep the self weights.
- W
Weights matrix.
- method
"union","intersection"or"average".
References
Bivand, R. S., Pebesma, E. and Gomez-Rubio, V. (2013). Applied Spatial Data Analysis with R, 2nd ed. Springer.
Gollini, I., Lu, B., Charlton, M., Brunsdon, C. and Harris, P. (2015). GWmodel: an R package for exploring spatial heterogeneity using geographically weighted models. Journal of Statistical Software 63(17).
