matrigraph()
produces a heatmap highlighting the deviations from
independence.
pvi()
computes for each cell of a numeric matrix the percentage to the
column theoretical independence value.
matrigraph(object, ...)pvi(object, ...)
# S4 method for matrix
pvi(object)
# S4 method for data.frame
pvi(object)
# S4 method for matrix
matrigraph(object, reverse = FALSE, axes = TRUE, ...)
# S4 method for data.frame
matrigraph(object, reverse = FALSE, ...)
A 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.
A logical
scalar: should negative deviations be centered
(see details)?
A logical
scalar: should axes be drawn on the plot? It will
omit labels where they would abut or overlap previously drawn labels.
N. Frerebeau
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
The PVI matrix allows to explore deviations from independence (an
intuitive approach to
matrigraph()
displays the deviations from independence:
If the PVI is equal to
If the PVI is less than
If the PVI is greater than
If reverse
is TRUE
, the fraction of negative deviations is displayed
as a white square.
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. tools:::Rd_expr_doi("10.3406/pica.2004.2396").
plot_heatmap()
Other plot methods:
plot_bertin()
,
plot_diceleraas()
,
plot_ford()
,
plot_heatmap()
,
plot_rank()
,
plot_spot()
,
seriograph()
## 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))
Run the code above in your browser using DataLab