geo_weights {ssMRCD} | R Documentation |
Inverse Geographic Weight Matrix
Description
Calculates a inverse-distance based weight matrix for the function ssMRCD
(see details).
Usage
geo_weights(coordinates, N_assignments)
Arguments
coordinates |
matrix of coordinates of observations. |
N_assignments |
vector of neighborhood assignments. |
Details
First, the centers (means of the coordinates given) of each neighborhood is calculated.
Then, the Euclidean distance between the centers is calculated and the weight is based on
the inverse distance between two neighborhoods,
It is scaled according to a weight matrix.
Value
Returns a weighting matrix W
and the coordinates of the centers per neighborhood centersN
.
See Also
Examples
coordinates = matrix(rnorm(1000), ncol = 2, nrow = 500)
N_ass = sample(1:5, 500, replace = TRUE)
geo_weights(coordinates, N_ass)
[Package ssMRCD version 0.1.0 Index]