Extract glmList Fitted Values

DESCRIPTION:

The fitted values of the specified type 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:

fitted(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 indicating the type of fitted values to be extracted from the glm fits, with choices "response" and "link". Partial matching of arguments is used, so only the first character needs to be provided. Default is "response".
subset
an optional character or integer vector naming the glm components of object from which the fitted values 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 fitted values split by groups; else the returned value is a vector. Defaults to FALSE.

VALUE:

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

SEE ALSO:

, .

EXAMPLES:

fm1 <- glmList(resp ~ trt | clinic, Clinic, family=binomial)
fitted(fm1)