[R] Test of Homogeneity of Variances

Daren Tan daren76 at hotmail.com
Fri Aug 22 17:17:41 CEST 2008


I am testing the homogeneity of variances via bartlett.test and fligner.test. Using the following example, how should I interpret the p-value in order to accept or reject the null hypothesis ?

set.seed(5)
x <- rnorm(20)
bartlett.test(x, rep(1:5, each=4))


        Bartlett test of homogeneity of variances


data:  x and rep(1:5, each = 4)
Bartlett's K-squared = 1.7709, df = 4, p-value = 0.7778

fligner.test(x, rep(1:5, each=4))

     Fligner-Killeen test of homogeneity of variances


data:  x and rep(1:5, each = 4)
Fligner-Killeen:med chi-squared = 1.0819, df = 4, p-value = 0.8971



More information about the R-help mailing list