Predictions from a glmList Object

DESCRIPTION:

If the grouping factor corresponding to object is included in newdata, the data frame is partitioned according to the grouping factor levels; else, newdata is repeated for all glm components. The predictions and, optionally, the standard errors for the predictions, are obtained for each glm component of object, using the corresponding element of the partitioned newdata , and arranged into a list with as many components as object, or combined into a single vector or data frame (if se.fit=TRUE).

USAGE:

predict(object, newdata, type, subset, asList, se.fit)

REQUIRED ARGUMENTS:

object
an object inheriting from class glmList, representing a list of glm objects with a common model.
newdata
an optional data frame to be used for obtaining the predictions. All variables used in the object model formula must be present in the data frame. If missing, the same data frame used to produce object is used.
type
an optional character string indicating the type of predicted values to be obtained for 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 predictions 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 predictions split by groups; else the returned value is a vector. Defaults to FALSE.
se.fit
an optional logical value indicating whether pointwise standard errors should be computed along with the predictions. Default is FALSE.

VALUE:

a list with components given by the predictions (and, optionally, the standard errors for the predictions) from each glm component of object, a vector with the predictions from all glm components of object, or a data frame with columns given by the predictions and their corresponding standard errors.

SEE ALSO:

, .

EXAMPLES:

fm1 <- glmList(resp ~ trt | clinic, Clinic, family=binomial)
predict(fm1, se.fit=T)