This help topic is for R version 1.5.0. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/residuals.html
residuals {base}R Documentation

Extract Model Residuals

Description

residuals is a generic function which extracts model residuals from objects returned by modeling functions.

The abbreviated form resid is an alias for residuals. It is intended to encourage users to access object components through an accessor function rather than by directly referencing an object slot.

All object classes which are returned by model fitting functions should provide a residuals method. (Note that the method is ‘residuals’ and not ‘resid’.)

Methods can make use of naresid methods to compensate for the omission of missing values. The default method does.

Usage

residuals(object, ...)
resid(object, ...)

Arguments

object

an object for which the extraction of model residuals is meaningful.

...

other arguments.

Value

Residuals extracted from the object object.

See Also

coefficients, fitted.values, glm, lm.


[Package base version 1.5.0 ]