Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bartlettTests

Bartlett Tests of Homogeneity of Variances


Description

This function extends bartlett.test to a multivariate response setting. It performs the Bartlett test of homogeneity of variances for each of a set of response variables, and prints a compact summary.

Usage

bartlettTests(y, group, ...)

Arguments

y

A data frame or matrix of numeric response variables in a multivariate linear model.

group

a vector or factor object giving the group for the corresponding elements of the rows of y

...

other arguments, passed to bartlett.test

Details

Bartlett's test is the univariate version of Box's M test for equality of covariance matrices. This function provides a univariate follow-up test to Box's M test to give one simple assessment of which response variables contribute to significant differences in variances among groups.

Value

An object of classes "anova" and "data.frame", with one observation for each response variable in y.

Author(s)

Michael Friendly

References

Bartlett, M. S. (1937). Properties of sufficiency and statistical tests. Proceedings of the Royal Society of London Series A, 160, 268-282.

See Also

boxM for Box's M test for all responses.

Examples

bartlettTests(iris[,1:4], iris$Species)

data(Skulls, package="heplots")
bartlettTests(Skulls[,-1], Skulls$epoch)

heplots

Visualizing Hypothesis Tests in Multivariate Linear Models

v1.3-8
GPL (>= 2)
Authors
John Fox [aut], Michael Friendly [aut, cre], Georges Monette [ctb], Phil Chalmers [ctb]
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.