DDistMat {SDPDmod}R Documentation

Double-Power Distance Weights Matrix

Description

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

Usage

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.

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,...).

Value

W

spatial weights matrix (Default, not normalized)

Author(s)

Rozeta Simonovska

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


[Package SDPDmod version 0.0.5 Index]