| Line 35... |
Line 35... |
| 35 |
\details{
|
35 |
\details{
|
| 36 |
\code{print.summary.lm} tries to be smart about formatting the
|
36 |
\code{print.summary.lm} tries to be smart about formatting the
|
| 37 |
coefficients, standard errors, etc. and additionally gives
|
37 |
coefficients, standard errors, etc. and additionally gives
|
| 38 |
\sQuote{significance stars} if \code{signif.stars} is \code{TRUE}.
|
38 |
\sQuote{significance stars} if \code{signif.stars} is \code{TRUE}.
|
| 39 |
|
39 |
|
| - |
|
40 |
Aliased coefficients are omitted in the returned object but restored
|
| - |
|
41 |
by the \code{print} method.
|
| - |
|
42 |
|
| 40 |
Correlations are printed to two decimal places (or symbolically): to
|
43 |
Correlations are printed to two decimal places (or symbolically): to
|
| 41 |
see the actual correlations print \code{summary(object)$correlation}
|
44 |
see the actual correlations print \code{summary(object)$correlation}
|
| 42 |
directly.
|
45 |
directly.
|
| 43 |
}
|
46 |
}
|
| 44 |
\value{
|
47 |
\value{
|
| Line 56... |
Line 59... |
| 56 |
coefficients are aliased.}
|
59 |
coefficients are aliased.}
|
| 57 |
\item{sigma}{the square root of the estimated variance of the random
|
60 |
\item{sigma}{the square root of the estimated variance of the random
|
| 58 |
error
|
61 |
error
|
| 59 |
\deqn{\hat\sigma^2 = \frac{1}{n-p}\sum_i{w_i R_i^2},}{\sigma^2 = 1/(n-p) Sum(w[i] R[i]^2),}
|
62 |
\deqn{\hat\sigma^2 = \frac{1}{n-p}\sum_i{w_i R_i^2},}{\sigma^2 = 1/(n-p) Sum(w[i] R[i]^2),}
|
| 60 |
where \eqn{R_i}{R[i]} is the \eqn{i}-th residual, \code{residuals[i]}.}
|
63 |
where \eqn{R_i}{R[i]} is the \eqn{i}-th residual, \code{residuals[i]}.}
|
| 61 |
\item{df}{degrees of freedom, a 3-vector \eqn{(p, n-p, p*)}, the last
|
64 |
\item{df}{degrees of freedom, a 3-vector \eqn{(p, n-p, p*)}, the first
|
| 62 |
being the number of non-aliased coefficients.}
|
65 |
being the number of non-aliased coefficients, the last being the total
|
| - |
|
66 |
number of coefficients.}
|
| 63 |
\item{fstatistic}{(for models including non-intercept terms)
|
67 |
\item{fstatistic}{(for models including non-intercept terms)
|
| 64 |
a 3-vector with the value of the F-statistic with
|
68 |
a 3-vector with the value of the F-statistic with
|
| 65 |
its numerator and denominator degrees of freedom.}
|
69 |
its numerator and denominator degrees of freedom.}
|
| 66 |
\item{r.squared}{\eqn{R^2}, the \sQuote{fraction of variance explained by
|
70 |
\item{r.squared}{\eqn{R^2}, the \sQuote{fraction of variance explained by
|
| 67 |
the model},
|
71 |
the model},
|
| Line 89... |
Line 93... |
| 89 |
##-- Continuing the lm(.) example:
|
93 |
##-- Continuing the lm(.) example:
|
| 90 |
coef(lm.D90) # the bare coefficients
|
94 |
coef(lm.D90) # the bare coefficients
|
| 91 |
sld90 <- summary(lm.D90 <- lm(weight ~ group -1)) # omitting intercept
|
95 |
sld90 <- summary(lm.D90 <- lm(weight ~ group -1)) # omitting intercept
|
| 92 |
sld90
|
96 |
sld90
|
| 93 |
coef(sld90) # much more
|
97 |
coef(sld90) # much more
|
| - |
|
98 |
|
| - |
|
99 |
## model with *aliased* coefficient:
|
| - |
|
100 |
lm.D9. <- lm(weight ~ group + I(group != "Ctl"))
|
| - |
|
101 |
Sm.D9. <- summary(lm.D9.)
|
| - |
|
102 |
Sm.D9. # shows the NA NA NA NA line
|
| - |
|
103 |
stopifnot(length(cc <- coef(lm.D9.)) == 3, is.na(cc[3]),
|
| - |
|
104 |
dim(coef(Sm.D9.)) == c(2,4), Sm.D9.$df == c(2, 18, 3))
|
| 94 |
}
|
105 |
}
|
| 95 |
\keyword{regression}
|
106 |
\keyword{regression}
|
| 96 |
\keyword{models}
|
107 |
\keyword{models}
|