calculates overall difference at the category level from a square contingency table

Share:

Description

calculates overall difference at the category level from a contingency table derived from the crosstabulation between a comparison variable (or variable at time t), and a reference variable (or variable at time t+1). Overall difference is equivalent to the addition of the quantity and allocation components of difference (i.e., overall difference can be disaggregated into quantity and allocation components).

Usage

1
overallDiffCatj(ctmatrix)

Arguments

ctmatrix

matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns)

Value

a numeric vector containing overall difference between the comparison variable and the reference variable at the category level. Output values are given in the same units as ctmatrix

References

Pontius Jr., R.G., Millones, M. 2011. Death to Kappa: birth of quantity disagreement and allocation disagreement for accuracy assessment. International Journal of Remote Sensing 32 (15), 4407-4429.

Pontius Jr., R.G., Santacruz, A. 2014. Quantity, exchange and shift components of difference in a square contingency table. International Journal of Remote Sensing 35 (21), 7543-7554.

See Also

overallDiff

Examples

1
2
3
4
comp <- raster(system.file("external/comparison.rst", package="diffeR"))
ref <- raster(system.file("external/reference.rst", package="diffeR"))
ctmatCompRef <- crosstabm(comp, ref)
overallDiffCatj(ctmatCompRef)