Learn R Programming

glmmrBase (version 1.0.0)

residuals.Model: Extract residuals from a `Model` object

Description

Return the residuals from a `Model` object. This function is a wrapper for `Model$residuals()`. Generates one of several types of residual for the model. If conditional = TRUE then the residuals include the random effects, otherwise only the fixed effects are included. For type, there are raw, pearson, and standardized residuals. For conditional residuals a matrix is returned with each column corresponding to a sample of the random effects.

Usage

# S3 method for Model
residuals(object, type, conditional, ...)

Value

A matrix with either one column is conditional is false, or with number of columns corresponding to the number of MCMC samples.

Arguments

object

A `Model` object.

type

Either "standardized", "raw" or "pearson"

conditional

Logical indicating whether to condition on the random effects (TRUE) or not (FALSE)

...

Further arguments passed from other methods