Skip to content

Generate a suite of diagnostic plots

Source: R/plotDiagnostics.R ยท Help: ?plotDiagnosticSuite

This convenience wrapper returns residual-vs-fitted and spread-level plots to help visually assess heteroscedastic patterns.

Usage

plotDiagnosticSuite(model, enhanced = FALSE)

Arguments

model
A fitted model of class lm.
enhanced
Logical, passed to plotResidualsFitted(). TRUE returns what the deprecated plotDiagnosticSuiteEnhanced() returned.

Value

A list with elements residuals_fitted and spread_level, each a ggplot object.

Examples

data(mtcars)
m <- lm(mpg ~ wt + qsec, data = mtcars)
plots <- plotDiagnosticSuite(m)
plots$residuals_fitted