residuals.asreml | R Documentation

## Use resid on an asreml object

### Description

This is a method for the function `residuals` for objects inheriting from class `asreml`. See `resid()` for the general behavior of this function.

### Usage

    residuals.asreml(object, type = c("stdCond", "working", "deviance",
                                      "pearson", "response"),
                     spatial = c("trend", "plot"))

### Arguments

`object` | an `asreml` object
`type` | type of residuals, with choices `"stdCond","working","deviance", "pearson", "working"` or `"response"`; `"stdCond"` is the default if `aom = TRUE` is given in the `asreml` call, else `"deviance"` residuals are returned unless specified otherwise.
`spatial` | if a second independent error term has been fitted by including `units` in the random formula, the residuals will have the `units` BLUPs added if `spatial = "plot"`.

### Value

the vector of residuals.

### Author(s)

David Butler

### See Also

`asreml`

### Examples

    data(oats, package="asreml3")
    oats.asr <- asreml(yield ~ Variety*Nitrogen, random = ~ Blocks/Wplots,
                       data=oats)
    resid(oats.asr)