-
Notifications
You must be signed in to change notification settings - Fork 1
/
confint.html
102 lines (72 loc) · 2.79 KB
/
confint.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
94
95
96
97
98
99
100
101
102
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Confidence Intervals for Model Parameters</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>
<table width="100%" summary="page for confint"><tr><td>confint</td><td align="right">R Documentation</td></tr></table>
<h2>Confidence Intervals for Model Parameters</h2>
<h3>Description</h3>
<p>Computes confidence intervals for one or more parameters in a fitted
model. There is a default and a method for objects inheriting from class
<code>"lm"</code>.
</p>
<h3>Usage</h3>
<pre>
confint(object, parm, level = 0.95, ...)
</pre>
<h3>Arguments</h3>
<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
<p>a fitted model object.</p>
</td></tr>
<tr valign="top"><td><code>parm</code></td>
<td>
<p>a specification of which parameters are to be given
confidence intervals, either a vector of numbers or a vector of
names. If missing, all parameters are considered.</p>
</td></tr>
<tr valign="top"><td><code>level</code></td>
<td>
<p>the confidence level required.</p>
</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
<p>additional argument(s) for methods.</p>
</td></tr>
</table>
<h3>Details</h3>
<p><code>confint</code> is a generic function. The default method assumes
asymptotic normality, and needs suitable <code>coef</code> and
<code>vcov</code> methods to be available. The default method can be
called directly for comparison with other methods.
</p>
<p>For objects of class <code>"lm"</code> the direct formulae based on <i>t</i>
values are used.
</p>
<p>There are stub methods for classes <code>"glm"</code> and <code>"nls"</code> which
invoke those in package <a href="http://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a> which are based on profile
likelihoods.
</p>
<h3>Value</h3>
<p>A matrix (or vector) with columns giving lower and upper confidence
limits for each parameter. These will be labelled as (1-level)/2 and
1 - (1-level)/2 in % (by default 2.5% and 97.5%).
</p>
<h3>See Also</h3>
<p><code>confint.glm</code> and
<code>confint.nls</code> in package <a href="http://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a>.
</p>
<h3>Examples</h3>
<pre>
fit <- lm(100/mpg ~ disp + hp + wt + am, data=mtcars)
confint(fit)
confint(fit, "wt")
## from example(glm) (needs MASS to be present on the system)
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9); treatment <- gl(3,3)
glm.D93 <- glm(counts ~ outcome + treatment, family=poisson())
confint(glm.D93)
confint.default(glm.D93) # based on asymptotic normality
</pre>
</body></html>