Test for heteroskedasticity under the assumption that the errors are independent and identically distributed (i.i.d.).
score_test(model, fitted_values = TRUE, rhs = FALSE, vars = NULL)
lm
score_test
returns an object of class "score_test"
.
An object of class "score_test"
is a list containing the
following components:
Breusch, T. S. and Pagan, A. R. (1979) A simple test for heteroscedasticity and random coefficient variation. Econometrica 47, 1287�1294.
Cook, R. D. and Weisberg, S. (1983) Diagnostics for heteroscedasticity in regression. Biometrika 70, 1�10.
Koenker, R. 1981. A note on studentizing a test for heteroskedasticity. Journal of Econometrics 17: 107�112.
model <- lm(mpg ~ disp + hp + wt, data = mtcars) score_test(model)#> #> Score Test for Heteroskedasticity #> --------------------------------- #> Ho: Variance is homogenous #> Ha: Variance is not homogenous #> #> Variables: fitted values of mpg #> #> Test Summary #> ------------------------ #> DF = 1 #> Chi2 = 0.645 #> Prob > Chi2 = 0.422