mood.test
Mood TwoSample Test of Scale
Performs Mood's twosample test for a difference in scale parameters.
 Keywords
 htest
Usage
mood.test(x, ...)
"mood.test"(x, y, alternative = c("two.sided", "less", "greater"), ...)
"mood.test"(formula, data, subset, na.action, ...)
Arguments
 x, y
 numeric vectors of data values.
 alternative
 indicates the alternative hypothesis and must be
one of
"two.sided"
(default),"greater"
or"less"
all of which can be abbreviated.  formula
 a formula of the form
lhs ~ rhs
wherelhs
is a numeric variable giving the data values andrhs
a factor with two levels giving the corresponding groups.  data
 an optional matrix or data frame (or similar: see
model.frame
) containing the variables in the formulaformula
. By default the variables are taken fromenvironment(formula)
.  subset
 an optional vector specifying a subset of observations to be used.
 na.action
 a function which indicates what should happen when
the data contain
NA
s. Defaults togetOption("na.action")
.  ...
 further arguments to be passed to or from methods.
Details
The underlying model is that the two samples are drawn from $f(xl)$ and $f((xl)/s)/s$, respectively, where $l$ is a common location parameter and $s$ is a scale parameter.
The null hypothesis is $s = 1$.
There are more useful tests for this problem.
In the case of ties, the formulation of Mielke (1967) is employed.
Value

A list with class
 statistic
 the value of the test statistic.
 p.value
 the pvalue of the test.
 alternative
 a character string describing the alternative hypothesis. You can specify just the initial letter.
 method
 the character string
"Mood twosample test of scale"
.  data.name
 a character string giving the names of the data.
"htest"
containing the following components:
References
William J. Conover (1971), Practical nonparametric statistics. New York: John Wiley & Sons. Pages 234f.
Paul W. Mielke, Jr. (1967), Note on some squared rank tests with existing ties. Technometrics, 9/2, 312314.
See Also
fligner.test
for a rankbased (nonparametric) ksample
test for homogeneity of variances;
ansari.test
for another rankbased twosample test for a
difference in scale parameters;
var.test
and bartlett.test
for parametric
tests for the homogeneity in variance.
Examples
library(stats)
## Same data as for the AnsariBradley test:
## Serum iron determination using Hyland control sera
ramsay < c(111, 107, 100, 99, 102, 106, 109, 108, 104, 99,
101, 96, 97, 102, 107, 113, 116, 113, 110, 98)
jung.parekh < c(107, 108, 106, 98, 105, 103, 110, 105, 104,
100, 96, 108, 103, 104, 114, 114, 113, 108, 106, 99)
mood.test(ramsay, jung.parekh)
## Compare this to ansari.test(ramsay, jung.parekh)