Test if k samples are from populations with equal variances.
ols_bartlett_test(data, ...) # S3 method for default ols_bartlett_test(data, ..., group_var = NULL)
data | A |
---|---|
... | Columns in |
group_var | Grouping variable. |
ols_bartlett_test
returns an object of class "ols_bartlett_test"
.
An object of class "ols_bartlett_test"
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.
Snedecor, George W. and Cochran, William G. (1989), Statistical Methods, Eighth Edition, Iowa State University Press.
Other heteroskedasticity tests: ols_bp_test
,
ols_f_test
, ols_score_test
# NOT RUN { # using grouping variable library(descriptr) ols_bartlett_test(mtcarz, mpg, group_var = cyl) # }# NOT RUN { # using variables ols_bartlett_test(hsb, read, write) # }