# jenks.tests: Indices for assessing class intervals In classInt: Choose Univariate Class Intervals

## Description

The function returns values of two indices for assessing class intervals: the goodness of variance fit measure, and the tabular accuracy index; optionally the overview accuracy index is also returned if the area argument is not missing.

## Usage

 1 jenks.tests(clI, area) 

## Arguments

 clI a "classIntervals" object area an optional vector of object areas if the overview accuracy index is also required

## Details

The goodness of variance fit measure is given by Armstrong et al. (2003, p. 600) as:

GVF = 1 - \frac{∑_{j=1}^{k}∑_{i=1}^{N_j}{(z_{ij} - \bar{z}_j)}^2}{∑_{i=1}^{N}{(z_{i} - \bar{z})}^2}

where the z_{i}, i=1,…,N are the observed values, k is the number of classes, \bar{z}_j the class mean for class j, and N_j the number of counties in class j.

The tabular accuracy index is given by Armstrong et al. (2003, p. 600) as:

TAI = 1 - \frac{∑_{j=1}^{k}∑_{i=1}^{N_j}{|z_{ij} - \bar{z}_j|}}{∑_{i=1}^{N}{|z_{i} - \bar{z}|}}

The overview accuracy index for polygon observations with known areas is given by Armstrong et al. (2003, p. 600) as:

OAI = 1 - \frac{∑_{j=1}^{k}∑_{i=1}^{N_j}{|z_{ij} - \bar{z}_j| a_{ij}}}{∑_{i=1}^{N}{|z_{i} - \bar{z}| a_i}}

where a_i, i=1,…,N are the polygon areas, and as above the a_{ij} term is indexed over j=1,…,k classes, and i=1,…,N_j polygons in class j.

## Value

a named vector of index values

## Author(s)

Roger Bivand <Roger.Bivand@nhh.no>

## References

Armstrong, M. P., Xiao, N., Bennett, D. A., 2003. "Using genetic algorithms to create multicriteria class intervals for choropleth maps". Annals, Association of American Geographers, 93 (3), 595–623; Jenks, G. F., Caspall, F. C., 1971. "Error on choroplethic maps: definition, measurement, reduction". Annals, Association of American Geographers, 61 (2), 217–244

classIntervals
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 data(jenks71) fix5 <- classIntervals(jenks71$jenks71, n=5, style="fixed", fixedBreaks=c(15.57, 25, 50, 75, 100, 155.30)) jenks.tests(fix5, jenks71$area) q5 <- classIntervals(jenks71$jenks71, n=5, style="quantile") jenks.tests(q5, jenks71$area) set.seed(1) k5 <- classIntervals(jenks71$jenks71, n=5, style="kmeans") jenks.tests(k5, jenks71$area) h5 <- classIntervals(jenks71$jenks71, n=5, style="hclust", method="complete") jenks.tests(h5, jenks71$area) jenks.tests(getHclustClassIntervals(h5, k=7), jenks71$area) jenks.tests(getHclustClassIntervals(h5, k=9), jenks71$area) set.seed(1) b5 <- classIntervals(jenks71$jenks71, n=5, style="bclust") jenks.tests(b5, jenks71$area) jenks.tests(getBclustClassIntervals(b5, k=7), jenks71$area) jenks.tests(getBclustClassIntervals(b5, k=9), jenks71$area)