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 w_{ij}, i, j = 1, ... n, where w_{ij} = (1-(\frac{d_{ij}}{D})^p)^p, if 0 <= d_{ij} < D and w_{ij} = 0, if d_{ij} > D or i = j. D is the cut-off distance point (maximum radius of influence), d_{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]