Dear Chris,
The following function is from my Rcmdr package for R, and is a slightly
modified version of a solution contributed by Brian Ripley to the R-help list:
levene.test <- function(y, group) {
meds <- tapply(y, group, median, na.rm=TRUE)
resp <- abs(y - meds[group])
table <- anova(lm(resp ~ group, na.action=na.omit))
rownames(table)[2] <- " "
cat("Levene's Test for Homogeneity of Variance\n\n")
table[,c(1,4,5)]
}
For S-PLUS, I've changed the function to specify na.action=na.omit in the
call to lm().
I hope this helps,
John
At 01:55 PM 2/25/2004 +0100, Christoph Scherber wrote:
Dear all,
is there a way to perform a Levene´s test for variance homogeneity in S-Plus?
Best wishes
Chris
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
phone: 905-525-9140x23604
web: http://socserv.mcmaster.ca/jfox
-----------------------------------------------------
|