struc_assoc | R Documentation |
Core-generating function for strucplot
returning a function
producing association plots.
struc_assoc(compress = TRUE, xlim = NULL, ylim = NULL,
yspace = unit(0.5, "lines"), xscale = 0.9, gp_axis = gpar(lty = 3))
compress |
logical; if |
xlim |
either a |
ylim |
either a |
xscale |
scale factor resizing the tile's width, thus adding additional space between the tiles. |
yspace |
object of class |
gp_axis |
object of class |
This function is usually called by strucplot
(typically when
called by assoc
) and returns a function used by
strucplot
to produce association plots.
A function with arguments:
residuals |
table of residuals. |
observed |
not used by |
expected |
table of expected frequencies. |
spacing |
object of class |
gp |
list of |
split_vertical |
vector of logicals indicating, for each dimension of the table, the split direction. |
David Meyer David.Meyer@R-project.org
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
Meyer, D., Zeileis, A., and Hornik, K. (2006),
The strucplot framework: Visualizing multi-way contingency tables with
vcd.
Journal of Statistical Software, 17(3), 1-48.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v017.i03")} and available as
vignette("strucplot")
.
assoc
,
strucplot
,
structable
## UCB Admissions
data("UCBAdmissions")
ucb <- aperm(UCBAdmissions)
## association plot for conditional independence
strucplot(ucb, expected = ~ Dept * (Admit + Gender),
core = struc_assoc(ylim = c(-4, 4)), labeling_args = list(abbreviate_labs = c(Admit = 3)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.