| seq_mosaic | R Documentation |
This function takes an n-way contingency table and plots mosaics for series of sequential models to the 1-, 2-, ... n-way marginal tables, corresponding to a variety of types of loglinear models.
seq_mosaic(
x,
panel = mosaic,
type = c("joint", "conditional", "mutual", "markov", "saturated"),
plots = 1:nf,
vorder = 1:nf,
k = NULL,
...
)
x |
a contingency table in array form, with optional category labels
specified in the |
panel |
a |
type |
type of sequential model to fit, a character string. One of
|
plots |
which marginal sub-tables to plot? A vector of a (sub)set of
the integers, |
vorder |
order of variables, a permutation of the integers |
k |
conditioning variable(s) for |
... |
other arguments passed to |
This function produces similar plots to the use of
mosaic.loglmlist, called with the result of
seq_loglm.
None. Used for its side-effect of producing plots
Michael Friendly
These functions were inspired by the original SAS implementation of mosaic displays, described in the User's Guide for Mosaics, http://www.datavis.ca/mosaics/mosaics.pdf
loglin-utilities for descriptions of sequential
models, conditional, joint, mutual, ...
loglmlist, mosaic.loglmlist,
seq_loglm
\code{\link{mosaic.glm}}, \code{\link[vcd]{mosaic}},
\code{\link[vcd]{strucplot}}, for the many parameters that control the details of mosaic plots.
data(Titanic, package="datasets")
seq_mosaic(Titanic) # models of joint independence, Survived last
seq_mosaic(Titanic, type="condit")
seq_mosaic(Titanic, type="mutual")
# other panel functions and options: presently BUGGED
## Not run:
seq_mosaic(Titanic, type="mutual", panel=sieve,
gp=shading_Friendly, labeling=labeling_values)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.