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")

