residuals.cartogramR {cartogramR}R Documentation

Errors of a cartogram object

Description

Errors of a cartogram object

Usage

## S3 method for class 'cartogramR'
residuals(object, ...)

Arguments

object

a cartogramR object

...

arguments passed to or from other methods. The following arguments are available: - type; a character string giving the type of residuals (see details) - "relative error" - "absolute error" - "symmetric difference" - center ; a character string giving the type of center: - "point_on_surface" (st_point_on_surface applied on original and on deformed/cartogram region). - "deformed_center" (the center function, see cartogramR_options, is applied on region and this center follows the deformation giving the center on the deformed/cartogram region) - "centroid" (centroid of original and deformed/cartogram region). Can be abbreviated.

Details

The error vector contains the values of the differences between actual area of regions in the cartogram and theorical area (obtained with conservation of total area and constant density over region in the final cartogram)

Relative error are the error vector divided by the theorical area

Symmetric difference are the symmetric difference between
actual area of regions in the cartogram and the original
area. Each region is scaled to have an area equal to 1 and centered
around the chosen center.

Value

A numeric vector which contains for each region observed area minus theorical area

Examples


  data(usa)
  carto <- cartogramR(usa, "electors64")
  residuals(carto)



[Package cartogramR version 1.0-10 Index]