matrigraph {tabula}R Documentation

Matrigraph

Description

Usage

matrigraph(object, ...)

pvi(object, ...)

## S4 method for signature 'matrix'
pvi(object)

## S4 method for signature 'data.frame'
pvi(object)

## S4 method for signature 'matrix'
matrigraph(object, reverse = FALSE, axes = TRUE, ...)

## S4 method for signature 'data.frame'
matrigraph(object, reverse = FALSE, ...)

Arguments

object

A m \times p numeric matrix or data.frame of count data (absolute frequencies giving the number of individuals for each category, i.e. a contingency table).

...

Currently not used.

reverse

A logical scalar: should negative deviations be centered (see details)?

axes

A logical scalar: should axes be drawn on the plot? It will omit labels where they would abut or overlap previously drawn labels.

Details

PVI (in french "pourcentages de valeur d'indépendance") is calculated for each cell as the percentage to the column theoretical independence value: PVI greater than 1 represent positive deviations from the independence, whereas PVI smaller than 1 represent negative deviations (Desachy 2004).

The PVI matrix allows to explore deviations from independence (an intuitive approach to \chi^2), in such a way that a high-contrast matrix has quite significant deviations, with a low risk of being due to randomness (Desachy 2004).

matrigraph() displays the deviations from independence:

If reverse is TRUE, the fraction of negative deviations is displayed as a white square.

Value

Author(s)

N. Frerebeau

References

Desachy, B. (2004). Le sériographe EPPM: un outil informatisé de sériation graphique pour tableaux de comptages. Revue archéologique de Picardie, 3(1), 39-56. doi:10.3406/pica.2004.2396.

See Also

plot_heatmap()

Other plot methods: plot_bertin(), plot_diceleraas(), plot_diversity, plot_ford(), plot_heatmap(), plot_rank(), plot_rarefaction, plot_spot(), seriograph()

Examples

## Data from Desachy 2004
data("compiegne", package = "folio")

## Matrigraph
matrigraph(compiegne)
matrigraph(compiegne, reverse = TRUE)

## Compute PVI
counts_pvi <- pvi(compiegne)
plot_heatmap(counts_pvi, col = khroma::color("iridescent")(12))

[Package tabula version 3.1.0 Index]