Levene's Test
Computes Levene's test for homogeneity of variance across groups.
leveneTest(y, ...) ## S3 method for class 'formula' leveneTest(y, data, ...) ## S3 method for class 'lm' leveneTest(y, ...) ## Default S3 method: leveneTest(y, group, center=median, ...)
y |
response variable for the default method, or a |
group |
factor defining groups. |
center |
The name of a function to compute the center of each group;
|
data |
a data frame for evaluating the |
... |
arguments to be passed down, e.g., |
returns an object meant to be printed showing the results of the test.
adapted from a response posted by Brian Ripley to the r-help email list.
John Fox jfox@mcmaster.ca; original generic version contributed by Derek Ogle
Fox, J. (2016) Applied Regression Analysis and Generalized Linear Models, Third Edition. Sage.
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition, Sage.
with(Moore, leveneTest(conformity, fcategory)) with(Moore, leveneTest(conformity, interaction(fcategory, partner.status))) leveneTest(conformity ~ fcategory*partner.status, data=Moore) leveneTest(lm(conformity ~ fcategory*partner.status, data=Moore)) leveneTest(conformity ~ fcategory*partner.status, data=Moore, center=mean) leveneTest(conformity ~ fcategory*partner.status, data=Moore, center=mean, trim=0.1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.