overallDiffCatj: calculates overall difference at the category level from a...

Description Usage Arguments Value References See Also Examples

View source: R/overallDiffCatj.R

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)

Example output

Loading required package: rgdal
Loading required package: sp
rgdal: version: 1.2-10, (SVN revision 673)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.10.1, released 2013/08/26
 Path to GDAL shared files: /usr/share/gdal/1.10
 Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
 Path to PROJ.4 shared files: (autodetected)
WARNING: no proj_defs.dat in PROJ.4 shared files
 Linking to sp version: 1.2-3 
Loading required package: raster
Loading required package: ggplot2
1 2 3 
6 6 6 

diffeR documentation built on May 30, 2017, 7:22 a.m.