Mosaic Displays in S-PLUS: a General Implementation and a Case Study
John W. Emerson

This paper offers an S-PLUS implementation of mosaic displays of the joint distribution of any number of categorical variables. As an illustration, I examine television viewer data from Nielsen Media Research. The mosaics show interesting patterns in viewer persistence -- viewers remaining with their current channels rather than switching channels -- supporting intuitive explanations of viewer behavior. Many graphical functions in S-PLUS provide for the display of relationships between continuous variables; mosaics help display relationships between categorical variables.

Key Words
Contingency table; Cross-tabulated data; Graphics; High-dimensional data; Television viewer behavior.

The S-PLUS implementation and the raw data are available here.

NEW 2006: the Yale Toolkit package includes the generalize pairs plots (with mosaics). Note that mosaicplot() is now built into R and S-Plus.

John W. Emerson is an Assistant Professor in the Department of Statistics, Yale University, New Haven, CT 06520.
The SAS implementation of mosaics, by Michael Friendly, is also available. Information about the JAVA implementation is available from Martin Theus.
A sample mosaic of television network shares and viewer transitions, for the week starting Monday November 6, 1995:

P = persist (white), S = switch (green), O = off (red).
A = ABC, C = CBS, N = NBC, F = FOX, Other = non-network, or cable viewing.