Learn R Programming

auditor (version 0.2.1)

plotScaleLocation: Scale location plot

Description

Variable values vs square root of the absolute value of the residuals. A vertical line corresponds to median.

Usage

plotScaleLocation(object, variable = NULL, score = FALSE)

Arguments

object

An object of class ModelAudit.

variable

Name of model 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).

score

A logical value. If TRUE value of scoreGQ will be added.

Examples

Run this code
# NOT RUN {
library(car)
lm_model <- lm(prestige~education + women + income, data = Prestige)
lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige)
plotScaleLocation(lm_au)


# }

Run the code above in your browser using DataLab