\HeaderA{HairEyeColor}{Hair and Eye Color of Statistics Students}{HairEyeColor}
\keyword{datasets}{HairEyeColor}
\begin{Description}\relax
Distribution of hair and eye color and sex in 592 statistics students.
\end{Description}
\begin{Usage}
\begin{verbatim}HairEyeColor\end{verbatim}
\end{Usage}
\begin{Format}\relax
A 3-dimensional array resulting from cross-tabulating 592 observations
on 3 variables.  The variables and their levels are as follows:

\Tabular{rll}{
No & Name & Levels \\
1 & Hair & Black, Brown, Red, Blond \\
2 & Eye & Brown, Blue, Hazel, Green \\
3 & Sex & Male, Female
}
\end{Format}
\begin{Details}\relax
This data set is useful for illustrating various techniques for the
analysis of contingency tables, such as the standard chi-squared test
or, more generally, log-linear modelling, and graphical methods such
as mosaic plots, sieve diagrams or association plots.
\end{Details}
\begin{References}\relax
Snee, R. D. (1974),
Graphical display of two-way contingency tables.
\emph{The American Statistician}, \bold{28}, 9--12.

Friendly, M. (1992),
Graphical methods for categorical data.
\emph{SAS User Group International Conference Proceedings}, \bold{17},
190--200.
\url{http://www.math.yorku.ca/SCS/sugi/sugi17-paper.html}

Friendly, M. (1992),
Mosaic displays for loglinear models.
\emph{Proceedings of the Statistical Graphics Section},
American Statistical Association, pp. 61--68.
\url{http://www.math.yorku.ca/SCS/Papers/asa92.html}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{chisq.test}{chisq.test}},
\code{\LinkA{loglin}{loglin}},
\code{\LinkA{mosaicplot}{mosaicplot}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
require(graphics)
## Full mosaic
mosaicplot(HairEyeColor)
## Aggregate over sex:
x <- apply(HairEyeColor, c(1, 2), sum)
x
mosaicplot(x, main = "Relation between hair and eye color")
\end{ExampleCode}
\end{Examples}

