Variable values vs square root of the absolute value of the residuals. A vertical line corresponds to median.
plotScaleLocation(object, ..., variable = NULL, score = FALSE, peaks = TRUE)
An object of class modelAudit or modelResiduals.
Other modelAudit objects to be plotted together.
Only for modelAudit object. 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 (
A logical value. If TRUE value of scorePeak will be added.
A logical value. If TRUE peaks are marked on plot by black dots.
library(car) lm_model <- lm(prestige~education + women + income, data = Prestige) lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige) plotScaleLocation(lm_au)