fligner.test(x, …)# S3 method for default
fligner.test(x, g, …)
# S3 method for formula
fligner.test(formula, data, subset, na.action, …)
x
.
Ignored if x
is a list.lhs ~ rhs
where lhs
gives the data values and rhs
the corresponding groups.model.frame
) containing the variables in the
formula formula
. By default the variables are taken from
environment(formula)
.NA
s. Defaults to
getOption("na.action")
."htest"
containing the following components:
"Fligner-Killeen test of homogeneity of variances"
.x
is a list, its elements are taken as the samples to be
compared for homogeneity of variances, and hence have to be numeric
data vectors. In this case, g
is ignored, and one can simply
use fligner.test(x)
to perform the test. If the samples are
not yet contained in a list, use fligner.test(list(x, ...))
. Otherwise, x
must be a numeric data vector, and g
must
be a vector or factor object of the same length as x
giving the
group for the corresponding elements of x
. The Fligner-Killeen (median) test has been determined in a simulation
study as one of the many tests for homogeneity of variances which is
most robust against departures from normality, see Conover, Johnson &
Johnson (1981). It is a \(k\)-sample simple linear rank which uses
the ranks of the absolute values of the centered samples and weights
\(a(i) = \mathrm{qnorm}((1 + i/(n+1))/2)\). The version implemented here uses median centering in
each of the samples (F-K:med \(X^2\) in the reference).ansari.test
and mood.test
for rank-based
two-sample test for a difference in scale parameters;
var.test
and bartlett.test
for parametric
tests for the homogeneity of variances.require(graphics)
plot(count ~ spray, data = InsectSprays)
fligner.test(InsectSprays$count, InsectSprays$spray)
fligner.test(count ~ spray, data = InsectSprays)
## Compare this to bartlett.test()
Run the code above in your browser using DataLab