Learn R Programming

auditor (version 0.3.0)

modelResiduals: Create Model Residuals explainer

Description

Creates modelResiduals object to be plotted.

Usage

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

Run this code
# 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