Creates modelResiduals object to be plotted.
modelResiduals(object, variable = NULL)
An object of class ModelAudit.
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).
# NOT RUN {
library(MASS)
model.glm <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia)
audit.glm <- audit(model.glm)
mr.glm <- modelResiduals(audit.glm)
# }
Run the code above in your browser using DataLab