R: Accessing Linear Model Fits

lm.summaries {base} | R Documentation

## Accessing Linear Model Fits

### Description

All these functions are `methods` for class `"lm"` objects.

### Usage

    coefficients(object, ...) ; \method

### Arguments

`object, x` | an object of class `lm`, usually, a result of a call to `lm`.
`...` | further arguments passed to or from other methods.

### Details

The generic accessor functions `coefficients`, `effects`, `fitted.values` and `residuals` can be used to extract various useful features of the value returned by `lm`.

### See Also

The model fitting function `lm`, `anova.lm`.

`coefficients`, `deviance`, `df.residual`, `effects`, `fitted.values`, `glm` for generalized linear models, `lm.influence` for regression diagnostics, `weighted.residuals`, `residuals`, `residuals.glm`, `summary.lm`.

### Examples

    ##-- Continuing the  lm(.) example:
    coef(lm.D90)# the bare coefficients

    ## The 2 basic regression diagnostic plots [plot.lm(.) is preferred]
    plot(resid(lm.D90), fitted(lm.D90))# Tukey-Anscombe's
    abline(h=0, lty=2, col = 'gray')

    qqnorm(residuals(lm.D90))

[Package Contents]