calDistance: calDistance

Description Usage Arguments Details Value Examples

Description

calDistance

Usage

1
2
calDistance(typedist = 1, tabVal = NULL, listZonePoint = NULL,
  zoneN = NULL, surfVoronoi = NULL, meanZone = NULL, pErr = 0.9)

Arguments

typedist

default value is 1, other values not implemented yet.

tabVal

SpatialPointsDataFrame, contains data points to be used for zoning (spatial coordinates plus attribute values) result of call to genMap

listZonePoint

list of indices of data points within zones, result of call to calNei

zoneN

zone neighborhood matrix (TRUE values on diagonal), result of call to calNei

surfVoronoi

vector of Voronoi polygon surfaces corresponding to all data points,result of call to genMap

meanZone

vector of average attribute values for all zones

pErr

error percentage for correcting distances

Details

calculates matrix of heterogeneities between neighbour zones. max(sigmai2[i],(fxmean*pErr/100)^2) + max(sigmai2[j],(fymean*pErr/100)^2) + (fxmean-fymean)^2

Value

a list with components

matDistance

matrix of real values, corresponding to heterogeneities between neighbour zones. All other values are set to 0.

matDistanceCorr

corrected distance matrix using pErr

cost

sum or errors obtained by replacing all data values within a zone by the zone mean value

Examples

1
2
3
4
5
6
7
# load test map with simulated data
data(mapTest)
# load zoning results from test file
data(resZTest)
K=resZTest
resD = calDistance(typedist=1,mapTest$krigData,K$listZonePoint,K$zoneN,
       mapTest$krigSurfVoronoi,K$meanZone,pErr=0.9)

hazaeljones/geozoning documentation built on May 30, 2019, 3:06 p.m.