Last chance! 50% off unlimited learning
Sale ends in
leveneTest(y, ...)
## S3 method for class 'formula':
leveneTest(y, data, ...)
## S3 method for class 'lm':
leveneTest(y, ...)
## S3 method for class 'default':
leveneTest(y, group, center=median, ...)
lm
or
formula
object. If y
is a linear-model object or a formula,
the variables on the right-hand-side of the model must all be factors and
must be completely mean
gives the original Levene's test; the default, median
,
provides a more robust test.formula
.data
for the
formula
and lm
methods; can also be used to pass arguments to
the function given by center
(e.g., center=mean
and
trim=0.1
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)
Run the code above in your browser using DataLab