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 wijw_{ij}, i,j=1,..n, where wij=1/dijγw_{ij}=1/d_{ij}^\gamma, if 0<=dij<D0 <= d_{ij} < D and wij=0w_{ij}=0, if dij>Dd_{ij} > D or i=ji = j. D is the distance cutoff point (maximum radius of influence), dijd_{ij} is the distance between spatial units i and j, and γ\gamma is the value for the exponent (e.g. γ\gamma = 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]