## S3 method for class 'default':
mosaicpairs(x, main = deparse(substitute(x)),
xlab = NULL, ylab = NULL, labels, ...,
type = c("pairwise", "total", "conditional", "joint"),
shade = TRUE, oma = NULL, cex.labels = NULL, label.pos = 0.5,
font.labels = 1, gap = 1)
## S3 method for class 'formula':
mosaicpairs(formula, data = NULL, \dots, main, subset)
dimnames(x)
attribute. The table is
best created by the table()
command.names(dimnames(X))
(i.e., the
name of the first and second variable in X
).shade
is TRUE
. Usy ~ x
.formula
should be taken.mosaicpairs()
plots a matrix of pairwise mosaic plots, four
independence types are distinguished:
"pairwise"
, "total"
, "conditional"
and "joint"
.
The pairwise mosaic matrix shows bivariate marginal relations, collapsed over
all other variables. The total independence mosaic matrix shows mosaic plots
for mutual independence, i.e. for marginal and conditional independence
among all pairs of variables. The conditional independence mosaic matrix shows
mosaic plots for marginal independence given all other variables. The
joint independence mosaic matrix shows mosaic plots for joint independence of all pairs of
variables from the others.mosaicplot
,
pairs
.data(UCBAdmissions)
data(PreSex)
mosaicpairs(PreSex, shade = TRUE)
mosaicpairs(UCBAdmissions, shade = TRUE)
mosaicpairs(UCBAdmissions, shade = TRUE, type="conditional")
Run the code above in your browser using DataLab