Draws a scale-location plot and reports the studentized Breusch-Pagan and Rainbow tests from lmtest.

heteroscedasticity_check(mdl, random = NULL)

Arguments

mdl

A fitted linear regression model.

random

Retained for backward compatibility; currently unused.

Value

A ggplot object with both tests stored in its sfl_tests attribute.

Examples

if (FALSE) { # \dontrun{
model <- stats::lm(mpg ~ wt + hp, data = mtcars)
heteroscedasticity_check(model)
} # }