Performs the Siegel-Tukey test on data x and y, where ties are handled by averaging ranks,
not by asymptotic approximations.
Usage
siegel.test(x, y, alternative = c("two.sided", "less", "greater"), reverse = FALSE,
all.perms = TRUE, num.sim = 20000)
Arguments
x
Numeric vector of data values.
y
Numeric vector of data values.
alternative
A character string specifying the alternative hypothesis, and
must be one of "two.sided" (default), "greater" or "less".
Only the initial letter needs to be specified.
reverse
Logical; If FALSE (default), then assign rank 1 to the smallest observation.
If TRUE, then assign rank 1 to the largest observation.
all.perms
Logical. The exact p-value is attempted when all.perms (i.e., all permutations)
is TRUE (default), and is simulated when all.perms is FALSE or when
computing an exact p-value requires more than num.sim calculations.
num.sim
The upper limit on the number of permutations generated.
Value
alternative
Same as the input.
rank.x
The Siegel-Tukey ranks of the data x.
rank.y
The Siegel-Tukey ranks of the data y.
p.value
The p-value of the test.
Details
Since the logical value of reverse may affect the p-value,
yet neither logical value of reverse is preferred over the other, one should
consider using ansari.test instead.
References
Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.
# NOT RUN {# The same data are used in the following two commands.siegel.test( c(13, 34, 2, 19, 49, 63), c(17, 29, 22) )
siegel.test( c(13, 34, 2, 19, 49, 63), c(17, 29, 22), reverse=TRUE )
# }