| lm.summaries {base} | R Documentation |
Accessing Linear Model Fits
Description
All these functions are methods for class lm or
summary.lm and anova.lm objects.
Usage
anova(object, ...)
anovalist(object, ..., test = NULL)
summary(object, correlation = FALSE)
coefficients(x) ; coef(x)
df.residual(x)
family(x)
formula(x)
fitted.values(x)
residuals(x)
weights(x)
plot(x)
print(summary.lm.obj, digits = max(3, .Options$digits - 3),
symbolic.cor = p > 4,
signif.stars= .Options$show.signif.stars, ...)
Arguments
object, x |
an object of class |
Details
print.summary.lm tries to be smart about formatting the
coefficients, standard errors, etc. and additionally gives
“significance stars” if signif.stars is TRUE.
anova.lm produces an analysis of variance (anova) table.
The generic accessor functions coefficients, effects,
fitted.values and residuals can be used to extract
various useful features of the value returned by lm.
Value
The function summary.lm computes and returns a list of summary
statistics of the fitted linear model given in lm.obj, using
the slots (list elements) "call", "terms", and
"residuals" from its argument, plus
coefficients |
a |
sigma |
the square root of the estimated variance of the random error
where |
df |
degrees of freedom, a 3-vector |
fstatistic |
a 3-vector with the value of the F-statistic with its numerator and denominator degrees of freedom. |
r.squared |
where |
adj.r.squared |
the above |
cov.unscaled |
a |
and if correlation = TRUE was specified,
correlation |
the correlation matrix corresponding to the above
|
See Also
The model fitting function lm.
anova for the ANOVA table,
coefficients, deviance,
effects, fitted.values,
glm for generalized linear models,
lm.influence for regression diagnostics,
residuals, summary.
Examples
##-- Continuing the lm(.) example:
coef(lm.D90)# the bare coefficients
sld90 <- summary(lm.D90 <- lm(weight ~ group -1))# omitting intercept
sld90
coef(sld90)# much more
## The 2 basic regression diagnostic plots:
plot(resid(lm.D90), fitted(lm.D90))# Tukey-Anscombe's
abline(h=0, lty=2, col = 'gray')
qqnorm(residuals(lm.D90))