| glejser | R Documentation | 
This function implements the method of \insertCiteGlejser69;textualskedastic for testing for "multiplicative" heteroskedasticity in a linear regression model. \insertCiteMittelhammer00;textualskedastic gives the formulation of the test used here.
glejser(
  mainlm,
  auxdesign = NA,
  sigmaest = c("main", "auxiliary"),
  statonly = FALSE
)
mainlm | 
 Either an object of   | 
auxdesign | 
 A   | 
sigmaest | 
 A character indicating which model residuals to use in the
  | 
statonly | 
 A logical. If   | 
Glejser's Test entails fitting an auxiliary regression model in
which the response variable is the absolute residual from the original
model and the design matrix Z consists of one or more exogenous
variables that are suspected of being related to the error variance.
In the absence of prior information on a possible choice of Z,
one would typically use the explanatory variables from the original model.
Under the null hypothesis of homoskedasticity, the distribution of the
test statistic is asymptotically chi-squared with parameter degrees
of freedom. The test is right-tailed.
An object of class "htest". If object is
not assigned, its attributes are displayed in the console as a
tibble using tidy.
the description of the test in SHAZAM software (which produces identical results).
mtcars_lm <- lm(mpg ~ wt + qsec + am, data = mtcars)
glejser(mtcars_lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.