Creates modelResiduals object to be plotted.

modelResiduals(object, variable = NULL)

Arguments

object

An object of class ModelAudit.

variable

Optional. Name of variable to order residuals. If value is NULL data order is taken. If value is "Predicted response" or "Fitted values" then data is ordered by fitted values. If value is "Observed response" the data is ordered by a vector of actual response (y parameter passed to the audit function).

Examples

library(MASS) model.glm <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia) audit.glm <- audit(model.glm) mr.glm <- modelResiduals(audit.glm)