| leveneTests | R Documentation |
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.
leveneTests(y, ...)
## Default S3 method:
leveneTests(y, group, center = median, ...)
## S3 method for class 'formula'
leveneTests(y, data, ...)
## S3 method for class 'lm'
leveneTests(y, ...)
y |
A data frame or matrix of numeric response variables for the default method, or a model formula for a multivariate linear model, or the multivariate linear model itself. In the case of a formula or model, the variables on the right-hand-side of the model must all be factors and must be completely crossed. |
... |
arguments to be passed down to |
group |
a vector or factor object giving the group for the
corresponding elements of the rows of |
center |
The name of a function to compute the center of each group;
|
data |
the data set, for the |
An object of classes "anova" and "data.frame", with one observation
for each response variable in y.
Michael Friendly
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.
leveneTest, bartlettTests
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)
# formula method
leveneTests(cbind(mb, bh, bl, nh) ~ epoch, data=Skulls)
# use 10% trimmed means
leveneTests(cbind(mb, bh, bl, nh) ~ epoch, data=Skulls, trim = 0.1)
# mlm method
skulls.mod <- lm(cbind(mb, bh, bl, nh) ~ epoch, data=Skulls)
leveneTests(skulls.mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.