"residualplot"(x, y = NULL, candy = TRUE, bandwidth = 0.3, xlab = "Fitted values", ylab = "Std.res.", col.sd = "blue", col.alpha = 0.3, ...)
"residualplot"(x, y, candy = TRUE, bandwidth = 0.3, xlab = "Fitted values", ylab = "Stud.res.", col.sd = "blue", col.alpha = 0.3, ...)
residualplot(x, y = NULL, candy = TRUE, bandwidth = 0.3, xlab = "Fitted values", ylab = "Std.res.", col.sd = "blue", col.alpha = 0.3, ...)TRUEThe brown area is a smoothed estimate of 1.96*SD of the standardized residuals in a window around the predicted value. The brown area should largely be rectangular if the standardized residuals have more or less the same variance.
The dashed line shows the smoothed mean of the standardized residuals and should generally follow the horizontal line through (0,0).
rstandard, predict
# Linear regression example
data(trees)
model <- lm(Volume ~ Girth + Height, data=trees)
residualplot(model)
Run the code above in your browser using DataLab