forked from vincentarelbundock/Rdatasets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHairEyePlace.html
93 lines (66 loc) · 2.89 KB
/
HairEyePlace.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html><html><head><title>R: Hair Color and Eye Color in Caithness and Aberdeen</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<script type="text/javascript">
const macros = { "\\R": "\\textsf{R}", "\\code": "\\texttt"};
function processMathHTML() {
var l = document.getElementsByClassName('reqn');
for (let e of l) { katex.render(e.textContent, e, { throwOnError: false, macros }); }
return;
}</script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
onload="processMathHTML();"></script>
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body><div class="container"><main>
<table style="width: 100%;"><tr><td>HairEyePlace</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>
Hair Color and Eye Color in Caithness and Aberdeen
</h2>
<h3>Description</h3>
<p>A three-way frequency table crossing eye color and hair color in two places, Caithness and Aberdeen,
Scotland.
These data were of interest to Fisher (1940) and others because
there are mixtures of people of Nordic, Celtic and Anglo-Saxon origin.
</p>
<p>One or both tables have been widely analyzed in conjunction with
RC and canonical correlation models for categorical data, e.g.,
Becker and Clogg (1989).
</p>
<h3>Usage</h3>
<pre><code class='language-R'>data(HairEyePlace)</code></pre>
<h3>Format</h3>
<p>The format is:
num [1:4, 1:5, 1:2] 326 688 343 98 38 116 84 48 241 584 ...
- attr(*, "dimnames")=List of 3
..$ Eye : chr [1:4] "Blue" "Light" "Medium" "Dark"
..$ Hair : chr [1:5] "Fair" "Red" "Medium" "Dark" ...
..$ Place: chr [1:2] "Caithness" "Aberdeen"
</p>
<h3>Details</h3>
<p>The hair and eye colors are ordered as in the original source,
suggesting that they form ordered categories.
</p>
<h3>Source</h3>
<p>This data was taken from the <code>colors</code> data in <span class="pkg">logmult</span>.
</p>
<h3>References</h3>
<p>Becker, M. P., and Clogg, C. C. (1989).
Analysis of Sets of Two-Way Contingency Tables Using Association Models.
<em>Journal of the American Statistical Association</em>, 84(405), 142-151.
</p>
<p>Fisher, R.A. (1940) The precision of discriminant functions.
<em>Annals of Eugenics</em>, 10, 422-429.
</p>
<h3>Examples</h3>
<pre><code class='language-R'>data(HairEyePlace)
# separate mosaics
mosaic(HairEyePlace[,,1], shade=TRUE, main="Caithness")
mosaic(HairEyePlace[,,2], shade=TRUE, main="Aberdeen")
# condition on Place
mosaic(~Hair + Eye |Place, data=HairEyePlace, shade=TRUE, legend=FALSE)
cotabplot(~Hair+Eye|Place, data=HairEyePlace, shade=TRUE, legend=FALSE)
</code></pre>
</main>
</div>
</body></html>