ExpDistMat function

Exponential distance matrix

Exponential distance matrix

This function calculates the (negative) exponential distance matrix, with a given cutoff distance and a positive exponent value.

ExpDistMat(distMat, distCutOff = NULL, expn = 0.01, mevn = FALSE)

Arguments

  • distMat: distance matrix
  • distCutOff: cutoff distance. Default = the maximal value from the distance matrix.
  • expn: positive exponent, default = 0.01
  • 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,..n, where wij=eαdijw_{ij}=e^{-\alpha d_{ij}}, 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 α\alpha is the positive exponent (e.g. α\alpha= 0.01, 0.02,...).

Examples

data(gN3dist) ##distance in meters W1 <- ExpDistMat(distMat = gN3dist, distCutOff = 100000) dist2 <- gN3dist/1000 ##in km W2 <- ExpDistMat(distMat = dist2, distCutOff = 100, expn = 0.02) W2nor <- ExpDistMat(distMat = dist2, 100000, 0.001, mevn = TRUE)

Author(s)

Rozeta Simonovska

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

Useful links