InvDistMat {SDPDmod} | R Documentation |
Inverse distance matrix
Description
This function calculates the inverse distances, with a given cutoff distance and a positive exponent.
Usage
InvDistMat(distMat, distCutOff = NULL, powr = 1, mevn = FALSE)
Arguments
distMat |
distance matrix |
distCutOff |
cutoff distance. Default = the maximal value from the distance matrix. |
powr |
power (positive exponent), default = 1 |
mevn |
logical, default FALSE. If TRUE, max-eigenvalue normalization is performed. |
Details
W is an nxn matrix with elements , i,j=1,..n, where
, if
and
, if
or
.
D is the distance cutoff point (maximum radius of influence),
is the distance between spatial units i and j,
and
is the value for the exponent (e.g.
= 1, 2, 3, 4,...).
Value
W |
weights matrix (Default, not normalized) |
Author(s)
Rozeta Simonovska
Examples
## distance between centroids of NUTS3 regions in Germany (in meters)
data(gN3dist, package = "SDPDmod")
## inverse distance matrix with cutoff 100000 meters
W1 <- InvDistMat(distMat = gN3dist, distCutOff = 100000)
dist2 <- gN3dist/1000 ##distance in km
## normalized distance matrix with cutoff 100km
W2 <- InvDistMat(distMat = dist2, distCutOff=100, powr = 2, mevn = TRUE)
[Package SDPDmod version 0.0.5 Index]