overallShiftD: calculates overall shift difference from a square contingency...

Description Usage Arguments Value References See Also Examples

View source: R/overallShiftD.R

Description

calculates overall shift difference 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). Shift refers to the difference remaining after subtracting quantity difference and exchange from the overall difference.

Usage

1
overallShiftD(ctmatrix)

Arguments

ctmatrix

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

Value

overall shift difference between the comparison variable and the reference variable. Output values are given in the same units as ctmatrix

References

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

overallAllocD

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)
overallShiftD(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] 3

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