Extract glmList Residuals

DESCRIPTION:

The residuals are extracted from each glm component of object and arranged into a list with as many components as object, or combined into a single vector.

USAGE:

residuals(object, type, subset, asList)

REQUIRED ARGUMENTS:

object
an object inheriting from class glmList, representing a list of glm objects with a common model.
type
an optional character string specifying the type of residuals to be extracted. Options include "response", "deviance", "pearson", and "working". See the documentation on residuals.glm for descriptions of the different residual types. Partial matching of arguments is used, so only the first character needs to be provided. Defaults to "response".
subset
an optional character or integer vector naming the glm components of object from which the residuals are to be extracted. Default is NULL, in which case all components are used.
asList
an optional logical value. If TRUE, the returned object is a list with the residuals split by groups; else the returned value is a vector. Defaults to FALSE.

VALUE:

a list with components given by the residuals of each glm component of object, or a vector with the residuals for all glm components of object.

SEE ALSO:

, , .

EXAMPLES:

fm1 <- glmList(resp ~ trt | clinic, Clinic, family=binomial)
residuals(fm1, type="d")