Test if k samples are from populations with equal variances.
ols_test_bartlett(data, ...) # S3 method for default ols_test_bartlett(data, ..., group_var = NULL)
data | A |
---|---|
... | Columns in |
group_var | Grouping variable. |
ols_test_bartlett
returns an object of class "ols_test_bartlett"
.
An object of class "ols_test_bartlett"
is a list containing the
following components:
f statistic
p-value of fstat
degrees of freedom
Bartlett's test is used to test if variances across samples is equal. It is sensitive to departures from normality. The Levene test is an alternative test that is less sensitive to departures from normality.
ols_bartlett_test()
has been deprecated. Instead use ols_test_bartlett()
.
Snedecor, George W. and Cochran, William G. (1989), Statistical Methods, Eighth Edition, Iowa State University Press.
Other heteroskedasticity tests: ols_test_breusch_pagan
,
ols_test_f
, ols_test_score
#>#>#> #>#>#> #>ols_test_bartlett(mtcarz, mpg, group_var = cyl)#> #> Bartlett's Test of Homogenity of Variances #> ------------------------------------------------ #> Ho: Variances are equal across groups #> Ha: Variances are unequal for atleast two groups #> #> Test Summary #> ----------------------------- #> DF = 2 #> Chi2 = 8.39345 #> Prob > Chi2 = 0.01504477# using variables ols_test_bartlett(hsb, read, write)#> #> Bartlett's Test of Homogenity of Variances #> ------------------------------------------------ #> Ho: Variances are equal across groups #> Ha: Variances are unequal for atleast two groups #> #> Data #> --------------------- #> Variables: read write #> #> Test Summary #> ---------------------------- #> DF = 1 #> Chi2 = 1.222871 #> Prob > Chi2 = 0.2687979