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))
FALSE
, the space between the rows
(columns) are chosen such that the total heights (widths) of
the rows (column) are all equal. If TRUE
, the space between
the rows and columns is fixed and hence the plot is more
compressed.xlim
correspond to the columns of the
association plot, the rows describe the column ranges (minimums in
the first row, maximums in the second row).
If xlim
is NULL
, the ranges are determined from the
residuals according to compress
(if TRUE
: widest range
from each column, if FALSE
: from the whole association plot
matrix).ylim
correspond to the rows of the association
plot, the rows describe the column ranges (minimums in the first
row, maximums in the second row).
If ylim
is NULL
, the ranges are determined from the
residuals according to compress
(if TRUE
: widest range
from each row, if FALSE
: from the whole association plot
matrix)."unit"
specifying additional
space separating the rows."gpar"
specifying the visual
aspects of the tiles' baseline.strucplot
(typically when
called by assoc
) and returns a function used by
strucplot
to produce association plots.
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.
URL http://www.jstatsoft.org/v17/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 = c(Admit = 3)))
Run the code above in your browser using DataLab