Learn R Programming

geozoning (version 1.0.0)

calCrit: calCrit

Description

calCrit

Usage

calCrit(matDistanceCorr, zoneNModif, optiCrit = 2)

Arguments

matDistanceCorr

corrected distance matrix between zones, result of call to calDistance

zoneNModif

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

optiCrit

criterion to be optimized. Possible values are :

1

min(mean(dij^2/(dii^2+dij^2)))

2

min(2*min(dij/(dii+djj)))

3

min(2*min(dij/(dii+djj)))

4

min(min(dij^2/sqrt(dii^2*djj^2)))

5

min(median(dij^2/sqrt(dii^2*djj^2)))

7

mean(2*mean(dij/(dii+djj)))

Value

the criterion value as a real positive number indicating the zoning quality.

Details

wrapper function that redirects to the proper criterion calculation function according to optiCrit arg value

Examples

Run this code
# NOT RUN {
# compute criterion on test zoning included in package
# 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)
crit = calCrit(resD$matDistanceCorr,K$zoneNModif,2)
print(crit)
# }

Run the code above in your browser using DataLab