Check model for (non-)constant error variance
Check model for (non-)constant error variance.
check_heteroscedasticity(x, ...) check_heteroskedasticity(x, ...)
x |
A model object. |
... |
Currently not used. |
This test of the hypothesis of (non-)constant error is also called Breusch-Pagan test (1979).
Invisibly returns the p-value of the test statistics. A p-value < 0.05 indicates a non-constant variance (heteroskedasticity).
There is also a plot()
-method implemented in the see-package.
Breusch, T. S., and Pagan, A. R. (1979) A simple test for heteroscedasticity and random coefficient variation. Econometrica 47, 1287–1294.
m <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) check_heteroscedasticity(m) # plot results if (require("see")) { x <- check_heteroscedasticity(m) plot(x) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.