bickel | R Documentation |
This function implements the method of \insertCiteBickel78;textualskedastic for testing for heteroskedasticity in a linear regression model, with or without the scale-invariance modification of \insertCiteCarroll81;textualskedastic.
bickel( mainlm, fitmethod = c("lm", "rlm"), a = "identity", b = c("hubersq", "tanhsq"), scale_invariant = TRUE, k = 1.345, statonly = FALSE, ... )
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 m in which case the
function applied is f(x) = x^m. Defaults to |
b |
A character argument specifying a function to be applied to the
residuals. Defaults to Huber's function squared, as recommended by
\insertCiteCarroll81;textualskedastic. Currently the only supported
functions are |
scale_invariant |
A logical indicating whether the scale-invariance
modification proposed by \insertCiteCarroll81;textualskedastic
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 |
Bickel's Test is a robust extension of Anscombe's Test \insertCiteAnscombe61skedastic 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.
An object of class
"htest"
. If object is
not assigned, its attributes are displayed in the console as a
tibble
using tidy
.
discussions of this test in \insertCiteCarroll81;textualskedastic and \insertCiteAli84;textualskedastic.
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars) bickel(mtcars_lm) bickel(mtcars_lm, fitmethod = "rlm") bickel(mtcars_lm, scale_invariant = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.