HairEyeColor              package:base              R Documentation

_H_a_i_r _a_n_d _E_y_e _C_o_l_o_r _o_f _S_t_a_t_i_s_t_i_c_s _S_t_u_d_e_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Distribution of hair and eye color and sex in 592 statistics
     students.

_U_s_a_g_e:

     data(HairEyeColor)

_F_o_r_m_a_t:

     A 3-dimensional array resulting from cross-tabulating 592
     observations on 3 variables.  The variables and their levels are
     as  follows:

       No  Name  Levels
        1  Hair  Black, Brown, Red, Blond
        2  Eye   Brown, Blue, Hazel, Green
        3  Sex   Male, Female

_D_e_t_a_i_l_s:

     This data set is useful for illustrating various techniques for
     the analysis of contingency tables, such as the standard
     chi-square test or, more generally, log-linear modelling, and
     graphical methods such as mosaic plots, sieve diagrams or
     association plots.

_R_e_f_e_r_e_n_c_e_s:

     Snee, R. D. (1974), Graphical display of two-way contingency
     tables. The American Statistician, 28, 9-12.

     Friendly, M. (1992), Graphical methods for categorical data. SAS
     User Group International Conference Proceedings, 17, 190-200.
     <URL: http://hotspur.psych.yorku.ca/SCS/sugi/sugi17-paper.html>

     Friendly, M. (1992), Mosaic displays for loglinear models.
     Proceedings of the Statistical Graphics Section, American
     Statistical Association, pp. 61-68. <URL:
     http://hotspur.psych.yorku.ca/SCS/Papers/asa92.html>

_E_x_a_m_p_l_e_s:

     data(HairEyeColor)
     ## Full mosaic
     mosaicplot(HairEyeColor)
     ## Aggregate over sex:
     x <- apply(HairEyeColor, c(1, 2), sum)
     x
     mosaicplot(x, main = "Relation between hair and eye color")

