Function for constructing inverse distance weight.
Usage
inverse_distance_swm(sfj, power = 1, bandwidth = NULL)
Value
A inverse distance weight matrices with class of matrix.
Arguments
sfj
Vector object that can be converted to sf by sf::st_as_sf().
power
(optional) Default is 1. Set to 2 for gravity weights.
bandwidth
(optional) When the distance is bigger than bandwidth, the
corresponding part of the weight matrix is set to 0. Default is NULL, which
means not use the bandwidth.
Details
The inverse distance weight formula is
\(w_{ij} = 1 / d_{ij}^\alpha\)