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

leveneTests

Levene Tests of Homogeneity of Variances


Description

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

Usage

leveneTests(y, group, center = median, ...)

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

center

The name of a function to compute the center of each group; mean gives the original Levene's (1960) test; the default, median, provides a more robust test suggested by Brown and Forsythe (1974).

...

other arguments, passed to leveneTest

Value

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

Author(s)

Michael Friendly

References

Levene, H. (1960). Robust Tests for Equality of Variances. In Olkin, I. et al. (Eds.), Contributions to Probability and Statistics: Essays in Honor of Harold Hotelling, Stanford University Press, 278-292.

Brown, M. B. & Forsythe, A. B. (1974). Robust Tests For Equality Of Variances Journal of the American Statistical Association, 69, 364-367.

See Also

Examples

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

# handle a 1-column response?
leveneTests(iris[,1, drop=FALSE], iris$Species)

data(Skulls, package="heplots")
leveneTests(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.