Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

panel_pairs_off-diagonal

Off-diagonal Panel Functions for Table Pairs Plot


Description

Off-diagonal panel functions for pairs.table.

Usage

pairs_strucplot(panel = mosaic, 
  type = c("pairwise", "total", "conditional", "joint"),
  legend = FALSE, margins = c(0, 0, 0, 0), labeling = NULL, ...)
pairs_assoc(...)
pairs_mosaic(...)
pairs_sieve(...)

Arguments

panel

function to be used for the plots in each cell, such as pairs_assoc, pairs_mosaic, and pairs_sieve.

type

character string specifying the type of independence model visualized in the cells.

legend

logical specifying whether a legend should be displayed in the cells or not.

margins

margins inside each cell (see strucplot).

labeling

labeling function or labeling-generating function (see strucplot).

...

pairs_mosaic, pairs_assoc, and pairs_sieve: parameters passed to pairs_strucplot. pairs_strucplot: other parameters passed to panel function.

Details

These functions really just wrap assoc, sieve, and mosaic by basically inhibiting labeling and legend-drawing and setting the margins to 0.

Value

A function with arguments:

x

contingency table.

i, j

cell coordinates.

Author(s)

References

Cohen, A. (1980), On the graphical display of the significant components in a two-way contingency table. Communications in Statistics—Theory and Methods, A9, 1025–1041.

Friendly, M. (1992), Graphical methods for categorical data. SAS User Group International Conference Proceedings, 17, 190–200. http://datavis.ca/papers/sugi/sugi17.pdf

See Also

Examples

data("UCBAdmissions")
data("PreSex")

pairs(PreSex)
pairs(UCBAdmissions)
pairs(UCBAdmissions, upper_panel_args = list(shade = FALSE))
pairs(UCBAdmissions, lower_panel = pairs_mosaic(type = "conditional"))
pairs(UCBAdmissions, upper_panel = pairs_assoc)

vcd

Visualizing Categorical Data

v1.4-10
GPL-2
Authors
David Meyer [aut, cre], Achim Zeileis [aut] (<https://orcid.org/0000-0003-0918-3766>), Kurt Hornik [aut], Florian Gerber [ctb], Michael Friendly [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.