resid.errors {dae}R Documentation

Extract the residuals for a fitted model

Description

Extracts the residuals from error.term or, if error.term is not specified, the last error.term in the analysis.

Usage

resid.errors(aov.obj, error.term=NULL)

Arguments

aov.obj An aov object or aovlist object created from a call to aov
error.term The error.term for which the residuals are to be extracted

Value

A numeric vector containing the residuals

Note

Only terms in the linear model will be included in the fitted values when computing the residuals. Terms in an Error function, but not in the model external to the Error function, will not be included. If you want them included, put them in both.

See Also

fitted.errors, tukey.1df.

Examples

        res <- resid.errors(crd.aov)
        rcbd.aov <- aov(Y ~ Blocks + Treats + Error(Blocks/Plots))
        res <- resid.errors(rcbd.aov, error.term = "Blocks:Plots")

[Package dae version 0.4-1 Index]