DDistMat function

Double-Power Distance Weights Matrix

Double-Power Distance Weights Matrix

This function calculates the double-power distance matrix, for a given distance cutoff and a positive exponent.

DDistMat(distMat, distCutOff = NULL, powr = 2, mevn = FALSE)

Arguments

  • distMat: distance matrix
  • distCutOff: distance cutoff. Default = the maximal value from the distance matrix.
  • powr: power (positive exponent), default 2
  • mevn: logical, default FALSE. If TRUE, max-eigenvalue normalization is performed.

Returns

  • W: spatial weights matrix (Default, not normalized)

Details

W is an nxn matrix with elements wijw_{ij}, i,j=1,...ni, j = 1, ... n, where wij=(1(dijD)p)pw_{ij} = (1-(\frac{d_{ij}}{D})^p)^p, if 0<=dij<D0 <= d_{ij} < D and wij=0w_{ij} = 0, if dij>Dd_{ij} > D or i=ji = j. D is the cut-off distance point (maximum radius of influence), dijd_{ij} is the distance between spatial units i and j, and p is the power value (e.g. p = 2, 3, 4,...).

Examples

data(gN3dist) ##distance in meters W1 <- DDistMat(distMat = gN3dist, distCutOff = 300000, powr = 3) ##distance cutoff in meters dist2 <- gN3dist/1000 ##in km W2 <- DDistMat(distMat = dist2, 300, 3) ##distance cutoff in kilometers

Author(s)

Rozeta Simonovska

  • Maintainer: Rozeta Simonovska
  • License: GPL (>= 3)
  • Last published: 2024-04-13

Useful links