HairEyeColor

data (HairEyeColor)

These data contain two tables, one for men and one for women. If we want to unify all the data in one, we will do the following:

globaltable = HairEyeColor [,, 1] + HairEyeColor [,, 2]

To save the data for men and women in two different tables:

table.men = HairEyeColor [,, 1] table.women = HairEyeColor [,, 2]

library(ca)
data(HairEyeColor)
HairEyeColor
## , , Sex = Male
## 
##        Eye
## Hair    Brown Blue Hazel Green
##   Black    32   11    10     3
##   Brown    53   50    25    15
##   Red      10   10     7     7
##   Blond     3   30     5     8
## 
## , , Sex = Female
## 
##        Eye
## Hair    Brown Blue Hazel Green
##   Black    36    9     5     2
##   Brown    66   34    29    14
##   Red      16    7     7     7
##   Blond     4   64     5     8
tabla.global = HairEyeColor[,,1]+HairEyeColor[,,2]
tabla.hombres = HairEyeColor[,,1]
tabla.mujeres = HairEyeColor[,,2]

#TABLE MEN
tabla.hombres
##        Eye
## Hair    Brown Blue Hazel Green
##   Black    32   11    10     3
##   Brown    53   50    25    15
##   Red      10   10     7     7
##   Blond     3   30     5     8
plot(ca(tabla.hombres))

#TABLE WOMEN
tabla.mujeres
##        Eye
## Hair    Brown Blue Hazel Green
##   Black    36    9     5     2
##   Brown    66   34    29    14
##   Red      16    7     7     7
##   Blond     4   64     5     8
plot(ca(tabla.mujeres))

#TABLE GLOBAL
tabla.global
##        Eye
## Hair    Brown Blue Hazel Green
##   Black    68   20    15     5
##   Brown   119   84    54    29
##   Red      26   17    14    14
##   Blond     7   94    10    16
plot(ca(tabla.global))

Comments

Doing the correspondence analysis I can observe for each table: In Men, the most common are brown hair and hazel eyes. The most significant characteristic for hair color is blonde. You can see two large groups of features, to the left of the graph the dark ones and to the right the light ones.

In women, the most common and least representative are brown hair and the most representative characteristics are blue eyes; and blonde hair.

In both, the most common characteristic is brown hair and the least, blonde hair.