levene.test {lawstat}R Documentation

Levene's Test of Equality of Variances

Description

The function performs the following tests for equality of the k population variances: classical Levene's test, the robust Brown-Forsythe Levene-type test using the group medians and the robust Levene-type test using the group trimmed mean. NAs from the data are omitted.

Usage

levene.test(y, group, option = c("mean", "median",
            "trim.mean"), trim.alpha = 0.25)

Arguments

y our data
group factor of the data
option The option must be "mean" corresponding to classical Levene's test (default), "median" corresponding to the robust Brown-Forsythe Levene-type test or "trim.mean" corresponding to the robust Levene-type test using the trimmed mean.
trim.alpha the fraction (0 to 0.5) of observations to be trimmed from each end of 'x' before the mean is computed.

Details

Levene (1960) proposed a test for homogeneity of variances in k groups which is based on the ANOVA statistic applied to absolute deviations of observations from the corresponding group mean. The robust Brown-Forsythe version of the Levene-type test substites the group mean by the group median in the classical Levene statistic. The third option is to consider ANOVA applied to the absolute deviations of observations from the group trimmed mean instead of the group means.

Value

A list with the following numeric components.

statistic the value of the test statistic.
p.value the p-value of the test.
method type of test was performed.
data.name a character string giving the name of the data.

Note

modified from a response posted by Brian Ripley to the R-help e-mail list.

Author(s)

W. Wallace Hui, Yulia R. Gel, Joseph L. Gastwirth, Weiwen Miao

References

Brown, M.~B. and Forsythe, A.~B. (1974). Robust tests for equality of variances. Journal of the American Statistical Association, 69, 364-367.

Gastwirth, J.~L., Gel, Y.~R., and Miao, W. (2006). The Impact of Levene's Test of Equality of Variances on Statistical Theory and Practice. Working paper, Department of Statistics, George Washington University.

Levene, H. (1960). Robust Tests for Equality of Variances, in Contributions to Probability and Statistics, ed. I. Olkin, Palo Alto, CA: Stanford Univ. Press.

Lim,T.-S., Loh, W.-Y. (1996) A comparison of tests of equality of variances Computational Statistical & Data Analysis 22, 287-301

See Also

ltrend.test

Examples


data(pot)
levene.test(pot[,"obs"], pot[,"type"], option="trim.mean", trim.alpha=0.25)

##        Modified Robust Levene's test based on the absolute deviations from
##        the trimmed mean
##
## data:  pot[,"obs"] 
## Test Statistic = 6.5673, p-value = 0.001591


[Package lawstat version 2.2 Index]