7. mosaic plot の歴史
• 詳細は、“Advances in Visualizing Categorical Data Using the vcd,
gnm and vcdExtra Packages in R CARME 2011”, http://carme2011.agrocampus-
ouest.fr/slides/Friendly_Turner_Firth_Zeileis.pdf
• Hartigan and Kleiner (1981, 1984): representing an n-way
contingency table by a “mosaic display,” showing a (recursive)
decomposition of frequencies by “tiles”, area ∼ cell frequency.
• Friendly (1994): developed the connection between mosaic
displays and loglinear models
• Showed how mosaic displays could be used to visualize both
observed frequency (area) and residuals (shading) from some
model.
1st presented at CARME 1995 (thx: Michael & Jörg!)
• Visualizing Categorical Data (Friendly, 2000)
• But: mosaic-like displays have a long history (Friendly, 2002)!
• 2002: vcd project at TU & WU, Vienna (Kurt Hornik, David Meyer,
Achim Zeileis) → vcd package
32. 問題は、structplot frameworkの変数
• strucplot
• From vcd v1.4-3 by David Meyer
• 92th Percentile
• Structured Displays of Contingency Tables
• This modular function visualizes certain aspects of
high-dimensional contingency tables in a
hierarchical way.
• https://www.rdocumentation.org/packages/vcd/ve
rsions/1.4-3/topics/strucplot
• もちろん ?structplot で参照可能。
33. ヒントは、R-help にありまし
た
• http://r.789695.n4.nabble.com/Re-fonts-in-mosaic-td3418263.html
• 回答は、 Michael Friendly先生!
• If you are doing multiple plots like this, there is no way I know of
to specify the fonts for labeling *once* for all such
plots. However,
you can do something like this to save typing and keep things
consistent:
my.largs <- list(
gp_labels = gpar(fontsize = 12, fontfamily = "calibri"),
gp_varnames = gpar(fontsize = 16, fontfamily = "calibri"))
mosaic(UCBAdmissions, labeling_args=my.largs)
mosaic(UCBAdmissions, labeling_args=my.largs, shade=TRUE)