szroeter | R Documentation |
This function implements the method of \insertCiteSzroeter78;textualskedastic for testing for heteroskedasticity in a linear regression model.
szroeter(mainlm, deflator = NA, h = SKH, qfmethod = "imhof", statonly = FALSE)
mainlm |
Either an object of |
deflator |
Either a character specifying a column name from the
design matrix of |
h |
A non-decreasing function taking as its argument the index
|
qfmethod |
A character, either |
statonly |
A logical. If |
The test entails putting the data rows in increasing order of some specified deflator (e.g., one of the explanatory variables) that is believed to be related to the error variance by some non-decreasing function. The test statistic is a ratio of quadratic forms in the OLS residuals. It is a right-tailed test.
An object of class
"htest"
. If object is
not assigned, its attributes are displayed in the console as a
tibble
using tidy
.
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
szroeter(mtcars_lm, deflator = "qsec")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.