bickel {skedastic} | R Documentation |
Bickel's Test for Heteroskedasticity in a Linear Regression Model
Description
This function implements the method of Bickel (1978) for testing for heteroskedasticity in a linear regression model, with or without the scale-invariance modification of Carroll and Ruppert (1981).
Usage
bickel(
mainlm,
fitmethod = c("lm", "rlm"),
a = "identity",
b = c("hubersq", "tanhsq"),
scale_invariant = TRUE,
k = 1.345,
statonly = FALSE,
...
)
Arguments
mainlm |
Either an object of |
fitmethod |
A character indicating the method to be used to fit the
regression model. This can be "OLS" for ordinary least squares (the
default) or "robust" in which case a robust fitting method is called
from |
a |
A character argument specifying the name of a function to be
applied to the fitted values, or an integer |
b |
A character argument specifying a function to be applied to the
residuals. Defaults to Huber's function squared, as recommended by
Carroll and Ruppert (1981). Currently the only supported
functions are |
scale_invariant |
A logical indicating whether the scale-invariance
modification proposed by Carroll and Ruppert (1981)
should be implemented. Defaults to |
k |
A double argument specifying a parameter for Huber's function
squared; used only if |
statonly |
A logical. If |
... |
Optional arguments to be passed to |
Details
Bickel's Test is a robust extension of Anscombe's Test
(Anscombe 1961) in which the OLS residuals and
estimated standard error are replaced with an M
estimator. Under
the null hypothesis of homoskedasticity, the distribution of the test
statistic is asymptotically standard normally distributed. 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.
Carroll RJ, Ruppert D (1981).
“On Robust Tests for Heteroscedasticity.”
The Annals of Statistics, 9(1), 206–210.
See Also
discussions of this test in Carroll and Ruppert (1981) and Ali and Giaccotto (1984).
Examples
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
bickel(mtcars_lm)
bickel(mtcars_lm, fitmethod = "rlm")
bickel(mtcars_lm, scale_invariant = FALSE)