Learn R Programming

robustlmm (version 1.4-2)

residuals.rlmerMod: Get residuals

Description

The per-observation residuals are returned, i.e., the difference of the observation and the fitted value including random effects. With type one can specify whether the weights should be used or not.

Usage

## S3 method for class 'rlmerMod':
residuals(object,
    type = c("response", "weighted"), scaled = FALSE, ...)

Arguments

object
rlmerMod object
type
type of residuals
scaled
scale residuals by residual standard deviation (=scale parameter)?
...
ignored

Examples

Run this code
fm <- rlmer(Yield ~ (1|Batch), Dyestuff)
stopifnot(all.equal(resid(fm, type="weighted"),
                    resid(fm) * getME(fm, "w_e")))

Run the code above in your browser using DataLab