mood.test: Mood Two-Sample Test of Scale

Description Usage Arguments Details Value References See Also Examples

Description

Performs Mood's two-sample test for a difference in scale parameters.

Usage

 1 2 3 4 5 6 7 8 mood.test(x, ...) ## Default S3 method: mood.test(x, y, alternative = c("two.sided", "less", "greater"), ...) ## S3 method for class 'formula' 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 where lhs is a numeric variable giving the data values and rhs 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 formula formula. By default the variables are taken from environment(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 NAs. Defaults to getOption("na.action"). ... further arguments to be passed to or from methods.

Details

The underlying model is that the two samples are drawn from f(x-l) and f((x-l)/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 "htest" containing the following components:

 statistic the value of the test statistic. p.value the p-value of the test. alternative a character string describing the alternative hypothesis. You can specify just the initial letter. method the character string "Mood two-sample test of scale". data.name a character string giving the names of the data.

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, 312–314. \Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("10.2307/1266427")}.