[R] Levene's test

Murray Jorgensen maj at waikato.ac.nz
Fri Sep 1 06:32:24 CEST 2000

I'm teaching one-way anova at the moment and throwing in a few snippets of
R on the way. I'd like to present a modified version of Levene's test for
homogeneity of variance between groups and give some R code for it.

The test that I was thinking of basically does an anova on a modified
response variable that is the absolute value of the difference between an
observation and the median of its group (more robust than Levene's original
choice, the mean).

A colleague has suggested an approach involving the functions 
ord() split() sapply() as.vector() rep()
which I have not quite got working yet. Even if I do get it working it
seems to make fairly heavy weather of would I would have thought was a
simple enough transformation. I'd like something that I could show my
students without discouraging them!

Suggestions gratefully received!

Murray Jorgensen

Murray Jorgensen,  Department of Statistics,  U of Waikato, Hamilton, NZ
-----[+64-7-838-4773]---------------------------[maj at waikato.ac.nz]-----
"Doubt everything or believe everything:these are two equally convenient
strategies. With either we dispense with the need to think."
http://www.stats.waikato.ac.nz/Staff/maj.html          - Henri Poincare'

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list