anscombe | R Documentation |
This function implements the method of \insertCiteAnscombe61;textualskedastic for testing for heteroskedasticity in a linear regression model, with or without the studentising modification of \insertCiteBickel78;textualskedastic.
anscombe(mainlm, studentise = TRUE, statonly = FALSE)
mainlm |
Either an object of |
studentise |
A logical. Should studentising modification of
\insertCiteBickel78;textualskedastic be implemented? Defaults to
|
statonly |
A logical. If |
Anscombe's Test is among the earliest suggestions for heteroskedasticity
diagnostics in the linear regression model. The test is not based on
formally derived theory but on a test statistic that Anscombe intuited
to be approximately standard normal under the null hypothesis of
homoskedasticity. \insertCiteBickel78;textualskedastic discusses
the test and suggests a studentising modification (included in this
function) as well as a robustifying modification
(included in bickel
). The test is two-tailed.
An object of class
"htest"
. If object is
not assigned, its attributes are displayed in the console as a
tibble
using tidy
.
bickel
, which is a robust extension of this test.
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
anscombe(mtcars_lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.