Package differ. R topics documented: February 19, 2015. Type Package



Similar documents
Package missforest. February 20, 2015

Data exploration with Microsoft Excel: analysing more than one variable

Lesson 15 - Fill Cells Plugin

Package treemap. February 15, 2013

Package empiricalfdr.deseq2

Package SHELF. February 5, 2016

Package retrosheet. April 13, 2015

Package hoarder. June 30, 2015

Package LexisPlotR. R topics documented: April 4, Type Package

Package gazepath. April 1, 2015

Package MDM. February 19, 2015

Package plan. R topics documented: February 20, 2015

Package pesticides. February 20, 2015

Package MBA. February 19, Index 7. Canopy LIDAR data

Package cgdsr. August 27, 2015

Package sendmailr. February 20, 2015

Shear :: Blocks (Video and Image Processing Blockset )

Package EstCRM. July 13, 2015

Package GSA. R topics documented: February 19, 2015

Package HHG. July 14, 2015

Package treemap. October 14, 2015

Package bigrf. February 19, 2015

GEOSTAT13 Spatial Data Analysis Tutorial: Raster Operations in R Tuesday AM

Introduction to GIS (Basics, Data, Analysis) & Case Studies. 13 th May Content. What is GIS?

Environmental Remote Sensing GEOG 2021

Package bigdata. R topics documented: February 19, 2015

Package hier.part. February 20, Index 11. Goodness of Fit Measures for a Regression Hierarchy

Package png. February 20, 2015

Scientists typically attempt to determine

Create a folder on your network drive called DEM. This is where data for the first part of this lesson will be stored.

Package neuralnet. February 20, 2015

Package HadoopStreaming

Package CoImp. February 19, 2015

InfiniteInsight 6.5 sp4

Optimization of sampling strata with the SamplingStrata package

Package sjdbc. R topics documented: February 20, 2015

Package DCG. R topics documented: June 8, Type Package

Scatter Plots with Error Bars

Package benford.analysis

Package tagcloud. R topics documented: July 3, 2015

Package ChannelAttribution

Package xtal. December 29, 2015

Package wordcloud. R topics documented: February 20, 2015

DATA ANALYSIS II. Matrix Algorithms

Package TRADER. February 10, 2016

Package TSfame. February 15, 2013

Paper No 19. FINALTERM EXAMINATION Fall 2009 MTH302- Business Mathematics & Statistics (Session - 2) Ref No: Time: 120 min Marks: 80

Package survpresmooth

Charlesworth School Year Group Maths Targets

Introduction to GIS. Dr F. Escobar, Assoc Prof G. Hunter, Assoc Prof I. Bishop, Dr A. Zerger Department of Geomatics, The University of Melbourne

Package RCassandra. R topics documented: February 19, Version Title R/Cassandra interface

Understanding Raster Data

Package MixGHD. June 26, 2015

Package CRM. R topics documented: February 19, 2015

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

Package optirum. December 31, 2015

Reading & Writing Spatial Data in R John Lewis. Some material used in these slides are taken from presentations by Roger Bivand and David Rossiter

Package erp.easy. September 26, 2015

Exploratory Data Analysis and Plotting

with functions, expressions and equations which follow in units 3 and 4.

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Summarizing and Displaying Categorical Data

Performance Level Descriptors Grade 6 Mathematics

Package AMORE. February 19, 2015

IBM SPSS Direct Marketing 22

Common Core Unit Summary Grades 6 to 8

Package pmr. May 15, 2015

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

MATH 095, College Prep Mathematics: Unit Coverage Pre-algebra topics (arithmetic skills) offered through BSE (Basic Skills Education)

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Package trimtrees. February 20, 2015

Cafcam: Crisp And Fuzzy Classification Accuracy Measurement Software

Grade 6 Mathematics Performance Level Descriptors

Introduction to the raster package (version 2.5-2)

Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, , , 4-9

Package changepoint. R topics documented: November 9, Type Package Title Methods for Changepoint Detection Version 2.

Package DSsim. September 25, 2015

Georgia Standards of Excellence Curriculum Map. Mathematics. GSE 8 th Grade

The G Chart in Minitab Statistical Software

Package MFDA. R topics documented: July 2, Version Date Title Model Based Functional Data Analysis

IBM SPSS Direct Marketing 23

PIXEL-LEVEL IMAGE FUSION USING BROVEY TRANSFORME AND WAVELET TRANSFORM

Primary Curriculum 2014

How To Understand And Solve Algebraic Equations

Raster Data Structures

Unit 1 Equations, Inequalities, Functions

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

Package obs.agree. February 20, 2015

SPC Response Variable

Scope and Sequence KA KB 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B

Gamma Distribution Fitting

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

Package globe. August 29, 2016

Package fimport. February 19, 2015

Package hive. January 10, 2011

A HYBRID APPROACH FOR AUTOMATED AREA AGGREGATION

Tutorial 8 Raster Data Analysis

PTC Mathcad Prime 3.0 Keyboard Shortcuts

How To Use Statgraphics Centurion Xvii (Version 17) On A Computer Or A Computer (For Free)

Transcription:

Type Package Package differ February 19, 2015 Title Difference Metrics for Comparing Pairs of Maps Version 0.0-2 Date 2014-11-28 Author Robert Gilmore Pontius Jr. <rpontius@clarku.edu>, Alí Santacruz <asantacruzdelgado@clarku.edu> Maintainer Alí Santacruz <amsantac@unal.edu.co> Depends R (>= 2.14.0), rgdal, raster, methods, ggplot2 Difference metrics for comparing pairs of maps representing real or categorical variables at original and multiple resolutions. License GPL (>= 2) Encoding latin1 NeedsCompilation no Repository CRAN Date/Publication 2015-02-08 01:01:04 R topics documented: differ-package....................................... 2 composite.......................................... 2 crosstabm.......................................... 4 differencemr........................................ 5 difftablej.......................................... 6 exchangedij......................................... 8 exchangedj......................................... 9 MAD............................................ 10 MADscatterplot....................................... 11 memberships........................................ 12 overallallocd........................................ 13 overallcomponentsplot................................... 14 overalldiff.......................................... 15 overalldiffcatj....................................... 16 1

2 composite overallexchanged...................................... 17 overallqtyd......................................... 18 overallshiftd........................................ 19 quantitydj.......................................... 20 sample2pop......................................... 21 shiftdj............................................ 22 Index 23 differ-package Difference Metrics for Comparing Pairs of Maps Details Difference metrics for comparing pairs of maps representing real or categorical variables at original and multiple resolutions. Package: composite Type: Package Version: 0.0-2 Date: 2014-11-28 License: GPL (>= 2) LazyLoad: yes Author(s) Robert Gilmore Pontius Jr. <rpontius@clarku.edu>, Alí Santacruz <asantacruzdelgado@clarku.edu> Maintainer: Alí Santacruz <amsantac@unal.edu.co> composite composite create a composite matrix provide a method to create a composite matrix from the crosstabulation of a comparison map (or map at time t) and a reference map (or map at time t+1), both aggregated at a given factor

composite 3 composite(comp, ref, factor) comp ref factor object of class RasterLayer corresponding to a comparison map (or map at time t) object of class RasterLayer corresponding to a reference map (or map at time t+1) integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor). See raster package for details Details the pixel definition in a composite matrix interpretes class membership as the proportion of a pixel that belongs to a class. The pixel contains information about only the quantity of each category (Kuzera and Pontius 2008). a matrix showing the contingency table derived from the crosstabulation of a comparison map (or map at time t) and a reference map (or map at time t+1), both aggregated at a given factor. Output values are given as proportion (0 to 1) Kuzera, K., Pontius Jr., R.G. 2008. Importance of matrix construction for multiple-resolution categorical map comparison. GIScience & Remote Sensing 45 (3), 249-274. memberships composite(comp, ref, factor=2)

4 crosstabm crosstabm create a contingency table between a comparison raster map (rows) and a reference raster map (columns) create a contingency table, also called cross-tabulated matrix, between a comparison raster map (rows), or map at time t, and a reference raster map (columns), or map at time t+1 crosstabm(comp, ref, percent=false, population=null) comp ref percent population object of class RasterLayer corresponding to the comparison map, or map at time t object of class RasterLayer corresponding to the reference map, or map at time t+1 logical. If TRUE, output values are given as percentage. If FALSE, output values are given in pixel counts an n x 2 matrix provided to correct the sample count to population count in the square contingency table. See Details below Details For correcting the sample count to population count in the square contingency table, assuming a stratified random sampling, an n (number of categories) by 2 matrix can be provided in the population argument. The first column of population must contains integer identifiers of each category, corresponding to the categories in the comparison map (or map at time t) and reference map (or map at time t+1). The second column corresponds to the population totals for each map category a matrix showing the cross-tabulation between the comparison map (or map at time t) and the reference map (or map at time t+1) memberships

differencemr 5 crosstabm(comp, ref) # Population-adjusted square contingency table (population <- matrix(c(1,2,3,2000,4000,6000), ncol=2)) crosstabm(comp, ref, population = population) # Population-adjusted square contingency table, output as percentage crosstabm(comp, ref, percent=true, population = population) differencemr calculates difference metrics between a reference map and a comparison map both consecutively aggregated at multiple resolutions calculates quantity, exchange and shift components of difference, as well as the overall difference, between a comparison raster map (or map at time t), and a reference raster map (or map at time t+1), both consecutively aggregated at multiple resolutions. Quantity difference is defined as the amount of difference between the reference map and a comparison map that is due to the less than maximum match in the proportions of the categories. Exchange consists of a transition from category i to category j in some pixels and a transition from category j to category i in an identical number of other pixels. Shift refers to the difference remaining after subtracting quantity difference and exchange from the overall difference. differencemr(comp, ref, eval="multiple", percent=true, fact=2, population=null) comp ref eval percent fact population object of class RasterLayer corresponding to the comparison map, or map at time t object of class RasterLayer corresponding to the reference map, or map at time t+1 default "original", return difference metrics between the input raster maps at the original resolution; if "multiple", return difference metrics at multiple resolutions aggregated according to a geometric sequence logical. If TRUE, output value is given as percentage. If FALSE, output value is given as proportion (0 to 1) integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor). See raster package for details an n x 2 matrix provided to correct the sample count to population count in the square contingency table. See Details below

6 difftablej Details For correcting the sample count to population count in the square contingency table, assuming a stratified random sampling, an n (number of categories) by 2 matrix can be provided in the population argument. The first column of population must contains integer identifiers of each category, corresponding to the categories in the comparison map (or map at time t) and reference map (or map at time t+1). The second column corresponds to the population totals for each map category data.frame containing quantity, exchange and shift components of difference, as well as the overall difference, between the comparison map and the reference map at multiple resolutions 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. overallqtyd ## Not run: differencemr(comp, ref, eval="original") differencemr(comp, ref, eval="multiple", fact=2) ## End(Not run) difftablej calculates difference metrics at the category level from a square contingency table calculates quantity, exchange and shift components of difference, as well as the 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). Quantity difference is defined as the amount of difference between the reference variable and a comparison variable that is due to the less than maximum match in the proportions of the categories.

difftablej 7 Exchange consists of a transition from category i to category j in some observations and a transition from category j to category i in an identical number of other observations. Shift refers to the difference remaining after subtracting quantity difference and exchange from the overall difference. difftablej() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) data.frame containing difference metrics at the category level between a comparison variable (rows) and a reference variable (columns). Output values are given in the same units as 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. overallqtyd ctmatcompref <- crosstabm(comp, ref) difftablej(ctmatcompref) # Adjustment to population assumming a stratified random sampling (population <- matrix(c(1,2,3,2000,4000,6000), ncol=2)) ctmatcompref <- crosstabm(comp, ref, percent=true, population = population) difftablej(ctmatcompref)

8 exchangedij exchangedij calculates the exchange matrix between pairs of categories calculates the exchange matrix between pairs of categories 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). Exchange consists of a transition from category i to category j in some observations and a transition from category j to category i in an identical number of other observations. exchangedij() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) a matrix containing exchange occurring between pairs of categories from the comparison variable and the reference variable. Exchange is shown in the lower triangle of the output matrix. Output values are given in the same units as exchangedj ctmatcompref <- crosstabm(comp, ref) exchangedij(ctmatcompref)

exchangedj 9 exchangedj calculates exchange difference at the category level from a square contingency table calculates exchange 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). Exchange consists of a transition from category i to category j in some observations and a transition from category j to category i in an identical number of other observations. exchangedj() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) a numeric vector containing the exchange difference between the comparison variable and the reference variable at the category level. Output values are given in the same units as overallqtyd ctmatcompref <- crosstabm(comp, ref) exchangedj(ctmatcompref)

10 MAD MAD Mean Absolute Deviation (MAD) Provides a method to compare the quantity difference and allocation difference between two images of the same real variable at the original resolution or at multiple resolutions. The output provides a stacked graph and an accompanying numerical table for the Mean Absolute Deviation (MAD) for the difference due to quantity, the difference due to stratum-level allocation, and difference due to pixel-level allocation. The output also indicates which image has a smaller average. A scatterplot indicating the distribution of values in relation to the 1:1 line can be produced with MADscatterplot MAD(grid1, grid2, strata=null, eval="original") grid1 grid2 strata eval object of class RasterLayer corresponding to the first image object of class RasterLayer corresponding to the second image object of class RasterLayer corresponding to the mask or strata image default "original", return the MAD value for the original resolution; if "multiple", return the MAD values for multiple resolutions following a geometric sequence a dataframe containing the multiples of the original resolution, the corresponding aggregated resolution, the difference due to quantity, the difference due to stratum-level allocation, and the difference due to pixel-level allocation. Pontius Jr., R.G., Thontteh, O., Chen, H. 2008. Components of information for multiple resolution comparison between maps that share a real variable. Environmental and Ecological Statistics 15 (2), 111-142. MADscatterplot

MADscatterplot 11 old.par <- par(no.readonly = TRUE) grid1 <- raster(system.file("external/grid1_int.rst", package="differ")) grid2 <- raster(system.file("external/grid2_int.rst", package="differ")) strata <- raster(system.file("external/strata_int.rst", package="differ")) MAD(grid1, grid2, strata, eval="original") MAD(grid1, grid2, strata, eval="multiple") ## Not run: veg_obs1 <- raster(system.file("external/veg_obs1.rst", package="differ")) veg_pre1 <- raster(system.file("external/veg_pre1.rst", package="differ")) veg_mask1 <- raster(system.file("external/veg_mask1.rst", package="differ")) MADscatterplot(veg_obs1, veg_pre1, veg_mask1) MAD(veg_obs1, veg_pre1, veg_mask1, eval="multiple") ## End(Not run) par(old.par) MADscatterplot MAD scatterplot Generates a scatterplot indicating the distribution of values from two images in relation to the 1:1 line MADscatterplot(grid1, grid2, strata=null) grid1 grid2 strata object of class RasterLayer corresponding to the first image object of class RasterLayer corresponding to the second image object of class RasterLayer corresponding to the mask or strata image a ggplot object corresponding to the scatterplot MAD

12 memberships old.par <- par(no.readonly = TRUE) grid1 <- raster(system.file("external/grid1_int.rst", package="differ")) grid2 <- raster(system.file("external/grid2_int.rst", package="differ")) strata <- raster(system.file("external/strata_int.rst", package="differ")) MADscatterplot(grid1, grid2, strata) veg_obs1 <- raster(system.file("external/veg_obs1.rst", package="differ")) veg_pre1 <- raster(system.file("external/veg_pre1.rst", package="differ")) veg_mask1 <- raster(system.file("external/veg_mask1.rst", package="differ")) MADscatterplot(veg_obs1, veg_pre1, veg_mask1) par(old.par) memberships produces membership values for each category in the input raster at a specified aggregated resolution Calculates membership values for each category in the input raster at a specified aggregated resolution memberships(grid, fact=2) grid fact object of class RasterLayer integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor). See raster package for details a RasterBrick object containing membership values for each category in the input raster at a specified aggregated resolution composite plot(ref) memb.ref <- memberships(ref, fact=2) names(memb.ref) <- c("ref.a", "ref.b", "ref.c") plot(memb.ref)

overallallocd 13 overallallocd calculates overall allocation difference from a square contingency table calculates overall allocation 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). Allocation difference is defined as the amount of difference between a reference variable and a comparison variable that is due to the less than maximum match in the spatial allocation of the categories, given the proportions of the categories in the reference and comparison variables. Allocation difference is equivalent to the addition of the exchange and shift components of difference (i.e., allocation difference can be disaggregated into exchange and shift components). overallallocd() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) overall allocation difference between the comparison variable and the reference variable. Output values are given in the same units as 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. overallqtyd, overallexchanged, overallshiftd ctmatcompref <- crosstabm(comp, ref) overallallocd(ctmatcompref)

14 overallcomponentsplot overallcomponentsplot Overall Components plot create the Overall Components plot from the comparison between a comparison map (or map at time t) and a reference map (or map at time t+1) overallcomponentsplot(comp, ref) comp ref object of class RasterLayer corresponding to a comparison map (or map at time t) object of class RasterLayer corresponding to a reference map (or map at time t+1) a stacked barplot showing the quantity, exchange and shift components of difference between the comparison map (or map at time t) and the reference map (or map at time t+1) 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. difftablej overallcomponentsplot(comp, ref)

overalldiff 15 overalldiff calculates overall difference between from a square contingency table calculates overall 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). 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). overalldiff() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) overall difference between the comparison variable and the reference variable. Output values are given in the same units as 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. overallqtyd, overallallocd ctmatcompref <- crosstabm(comp, ref) overalldiff(ctmatcompref)

16 overalldiffcatj overalldiffcatj calculates overall difference at the category level from a square contingency table 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). overalldiffcatj() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) 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 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. overalldiff ctmatcompref <- crosstabm(comp, ref) overalldiffcatj(ctmatcompref)

overallexchanged 17 overallexchanged calculates overall exchange difference from a square contingency table calculates overall exchange 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). Exchange consists of a transition from category i to category j in some observations and a transition from category j to category i in an identical number of other observations. overallexchanged() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) overall exchange difference between the comparison variable and the reference variable. Output values are given in the same units as overallallocd ctmatcompref <- crosstabm(comp, ref) overallexchanged(ctmatcompref)

18 overallqtyd overallqtyd calculates overall quantity difference from a square contingency table calculates overall quantity 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). Quantity difference is defined as the amount of difference between the reference variable and a comparison variable that is due to the less than maximum match in the proportions of the categories. overallqtyd() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) overall quantity difference between the comparison variable and the reference variable. Output values are given in the same units as 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. overallallocd ctmatcompref <- crosstabm(comp, ref) overallqtyd(ctmatcompref)

overallshiftd 19 overallshiftd calculates overall shift difference from a square contingency table 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. overallshiftd() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) overall shift difference between the comparison variable and the reference variable. Output values are given in the same units as overallallocd ctmatcompref <- crosstabm(comp, ref) overallshiftd(ctmatcompref)

20 quantitydj quantitydj calculates quantity difference at the category level from a square contingency table calculates quantity 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). Quantity difference is defined as the amount of difference between the reference variable and a comparison variable that is due to the less than maximum match in the proportions of the categories. quantitydj() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) a numeric vector containing the quantity difference between the comparison variable and the reference variable at the category level. Output values are given in the same units as 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. overallqtyd ctmatcompref <- crosstabm(comp, ref) quantitydj(ctmatcompref)

sample2pop 21 sample2pop corrects sample counts to population counts in a square contingency table Converts sample count to population count in the square contingency table, assuming a stratified random sampling sample2pop(, population) population matrix representing a sampling-derived square contingency table between a comparison variable (rows) and a reference variable (columns) an n x 2 matrix provided to correct the sample count to population count in the square contingency table. See Details below Details The first column of population must contain integer identifiers of each category, corresponding to the categories in the comparison and reference variables. The second column corresponds to the population totals for each category. matrix representing a population-adjusted square contingency table for the crosstabulation between a comparison variable (rows) and a reference variable (columns). Output values are given in the same units as crosstabm # Sample square contingency table (ctmatcompref <- crosstabm(comp, ref)) # Population-adjusted square contingency table (population <- matrix(c(1,2,3,2000,4000,6000), ncol=2)) sample2pop(ctmatcompref, population = population)

22 shiftdj # The square contingency table can also be adjusted directly using the crosstabm function crosstabm(comp, ref, population = population) shiftdj calculates shift difference at the category level from a square contingency table calculates shift 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). Shift refers to the difference remaining after subtracting quantity difference and exchange from the overall difference. shiftdj() matrix representing a square contingency table between a comparison variable (rows) and a reference variable (columns) a numeric vector containing the shift difference between the comparison variable and the reference variable at the category level. Output values are given in the same units as overalldiff ctmatcompref <- crosstabm(comp, ref) shiftdj(ctmatcompref)

Index Topic package differ-package, 2 Topic spatial composite, 2 crosstabm, 4 differ-package, 2 differencemr, 5 difftablej, 6 exchangedij, 8 exchangedj, 9 MAD, 10 MADscatterplot, 11 memberships, 12 overallallocd, 13 overallcomponentsplot, 14 overalldiff, 15 overalldiffcatj, 16 overallexchanged, 17 overallqtyd, 18 overallshiftd, 19 quantitydj, 20 sample2pop, 21 shiftdj, 22 overalldiffcatj, 16 overallexchanged, 13, 17 overallqtyd, 6, 7, 9, 13, 15, 18, 20 overallshiftd, 13, 19 quantitydj, 20 sample2pop, 21 shiftdj, 22 composite, 2, 2, 12 crosstabm, 4, 21 differ-package, 2 differencemr, 5 difftablej, 6, 14 exchangedij, 8 exchangedj, 8, 9 MAD, 10, 11 MADscatterplot, 10, 11 memberships, 3, 4, 12 overallallocd, 13, 15, 17 19 overallcomponentsplot, 14 overalldiff, 15, 16, 22 23