Siegel-Tukey Rank Dispersion Test
Performs Siegel-Tukey non-parametric rank dispersion test.
siegelTukeyTest(x, ...) ## Default S3 method: siegelTukeyTest( x, y, alternative = c("two.sided", "greater", "less"), median.corr = FALSE, ... ) ## S3 method for class 'formula' siegelTukeyTest(formula, data, subset, na.action, ...)
x, y |
numeric vectors of data values. |
... |
further arguments to be passed to or from methods. |
alternative |
a character string specifying the
alternative hypothesis, must be one of |
median.corr |
logical indicator, whether median correction
should be performed prior testing. Defaults to |
formula |
a formula of the form |
data |
an optional matrix or data frame (or similar: see
|
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 |
Let x and y denote two identically and independently distributed variables of at least ordinal scale. Further, let theta, and lambda denote location and scale parameter of the common, but unknown distribution. Then for the two-tailed case, the null hypothesis H: lambdaX / lambdaY = 1 | thetaX = thetaY is tested against the alternative, A: lambdaX / lambdaY != 1.
The data are combinedly ranked according to Siegel-Tukey.
The ranking is done by alternate extremes (rank 1 is lowest,
2 and 3 are the two highest, 4 and 5 are the two next lowest, etc.).
If no ties are present, the p-values are computed from
the Wilcoxon distribution (see Wilcoxon
).
In the case of ties, a tie correction is done according
to Sachs (1997) and approximate p-values are computed
from the standard normal distribution (see Normal
).
If both medians differ, one can correct for medians to increase the specificity of the test.
A list with class "htest"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
the estimated quantile of the test statistic.
the p-value for the test.
the parameters of the test statistic, if any.
a character string describing the alternative hypothesis.
the estimates, if any.
the estimate under the null hypothesis, if any.
The algorithm for the Siegel-Tukey ranks was taken from the code of Daniel Malter. See also the blog from Tal Galili (02/2010, https://www.r-statistics.com/2010/02/siegel-tukey-a-non-parametric-test-for-equality-in-variability-r-code/, accessed 2018-08-05).
Sachs, L. (1997), Angewandte Statistik. Berlin: Springer.
Siegel, S., Tukey, J. W. (1960), A nonparametric sum of ranks procedure for relative spread in unpaired samples, Journal of the American Statistical Association 55, 429–455.
## Sachs, 1997, p. 376 A <- c(10.1, 7.3, 12.6, 2.4, 6.1, 8.5, 8.8, 9.4, 10.1, 9.8) B <- c(15.3, 3.6, 16.5, 2.9, 3.3, 4.2, 4.9, 7.3, 11.7, 13.7) siegelTukeyTest(A, B) ## from example var.test x <- rnorm(50, mean = 0, sd = 2) y <- rnorm(30, mean = 1, sd = 1) siegelTukeyTest(x, y, median.corr = TRUE) ## directional hypothesis A <- c(33, 62, 84, 85, 88, 93, 97) B <- c(4, 16, 48, 51, 66, 98) siegelTukeyTest(A, B, alternative = "greater")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.