anscombe {skedastic} | R Documentation |
Anscombe's Test for Heteroskedasticity in a Linear Regression Model
Description
This function implements the method of Anscombe (1961) for testing for heteroskedasticity in a linear regression model, with or without the studentising modification of Bickel (1978).
Usage
anscombe(mainlm, studentise = TRUE, statonly = FALSE)
Arguments
mainlm |
Either an object of |
studentise |
A logical. Should studentising modification of
Bickel (1978) be implemented? Defaults to
|
statonly |
A logical. If |
Details
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. Bickel (1978) 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.
Value
An object of class
"htest"
. If object is
not assigned, its attributes are displayed in the console as a
tibble
using tidy
.
References
Anscombe FJ (1961).
“Examination of Residuals.”
In Neyman J (ed.), Fourth Berkeley Symposium on Mathematical Statistics and Probability June 20-July 30, 1960, 1–36.
Berkeley: University of California Press.
Bickel PJ (1978).
“Using Residuals Robustly I: Tests for Heteroscedasticity, Nonlinearity.”
The Annals of Statistics, 6(2), 266–291.
See Also
bickel
, which is a robust extension of this test.
Examples
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
anscombe(mtcars_lm)