forked from vincentarelbundock/Rdatasets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HospVisits.html
89 lines (61 loc) · 2.55 KB
/
HospVisits.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
<!DOCTYPE html><html><head><title>R: Hospital Visits Data</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>HospVisits</td><td style="text-align: right;">R Documentation</td></tr></table>
<h2>
Hospital Visits Data
</h2>
<h3>Description</h3>
<p>Length of stay in hospital for 132 schizophrenic patients, classified by
visiting patterns, originally from Wing (1962).
</p>
<h3>Usage</h3>
<pre><code class='language-R'>data("HospVisits")</code></pre>
<h3>Format</h3>
<p>A 3 by 3 frequency table, with format:
table [1:3, 1:3] 43 6 9 16 11 18 3 10 16
- attr(*, "dimnames")=List of 2
..$ visit: chr [1:3] "Regular" "Infrequent" "Never"
..$ stay : chr [1:3] "2-9" "10-19" "20+"
</p>
<h3>Details</h3>
<p>Both table variables can be considered ordinal.
The variable <code>visit</code> refers to visiting patterns recorded hospital.
The category labels are abbreviations of those given by Goodman (1983);
e.g., <code>"Regular"</code> is short for “received visitors regularly or patient went home”.
The variable <code>stay</code> refers to length of stay in hospital, in year groups.
</p>
<h3>Source</h3>
<p>Goodman, L. A. (1983) The analysis of dependence in cross-classifications having ordered categories, using log-linear models for frequencies and log-linear models for odds.
<em>Biometrics</em>, 39, 149-160.
</p>
<h3>References</h3>
<p>Wing, J. K. (1962). Institutionalism in Mental Hospitals,
<em>British Journal of Social and Clinical Psychology</em>, 1 (1), 38-51.
</p>
<h3>See Also</h3>
<p><code>ca</code></p>
<h3>Examples</h3>
<pre><code class='language-R'>data(HospVisits)
mosaic(HospVisits, gp=shading_Friendly)
if(require(ca)){
ca(HospVisits)
# surprisingly 1D !
plot(ca(HospVisits))
}
</code></pre>
</main>
</div>
</body></html>