Ansari-Bradley Test

Usage

ansari.test(x, y, alternative = "two.sided", exact = NULL)

Arguments

x numeric vector of data values.
y numeric vector of data values.
alternative indicates the alternative hypothesis and must be one of "two.sided", "greater" or "less". You can specify just the initial letter.
exact a logical indicating whether an exact p-value should be computed.

Description

Performs the Ansari-Bradley test for a difference in scale parameters.

Details

Suppose that x and y are independent samples from distributions with densities f((t-m)/s)/s and f(t-m), respectively, where m is an unknown nuisance parameter and s is the parameter of interest. The Ansari-Bradley test is used for testing the null that s equals 1, the two-sided alternative being that s != 1 (the distributions differ only in variance), and the one-sided alternatives being s > 1 (the distribution underlying x has a larger variance, "greater") or s < 1 ("less").

By default (if exact is not specified), an exact p-value is computed if both samples contain less than 50 finite values and there are no ties. Otherwise, a normal approximation is used.

Value

A list with class "htest" containing the following components:
statistic the value of the Ansari-Bradley test statistic.
p.value the p-value of the test.
alternative a character string describing the alternative hypothesis.
method the string "Ansari-Bradley test".
data.name a character string giving the names of the data.

References

Myles Hollander & Douglas A. Wolfe (1973), Nonparametric statistical inference. New York: John Wiley & Sons.

Examples

## Hollander & Wolfe (1973, p. 86f):
## 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)
ansari.test(ramsay, jung.parekh)


[Package Contents]