rrod.test | R Documentation |
Performs Fligner-Pollicello robust rank-order distributional test for location.
rrod.test(x, ...)
## Default S3 method:
rrod.test(x, y, alternative = c("two.sided", "less", "greater"), ...)
## S3 method for class 'formula'
rrod.test(formula, data, subset, na.action, ...)
x |
a vector of data values. |
... |
further arguments to be passed to or from methods. |
y |
an optional numeric vector of data values. |
alternative |
the alternative hypothesis. 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 |
The non-parametric RROD two-sample test can be used to test for differences in location, whereas it does not assume variance homogeneity.
Let X
and Y
denote two samples with sizes n_x
and n_y
of a continuous variable.First, the combined sample is transformed
into ranks in increasing order.
Let S_{xi}
and S_{yj}
denote the counts of Y
(X)
values having a lower rank than x_i
(y_j)
. The mean counts are:
\bar{S}_x = \sum_{i=1}^{n_x} S_{xi} / n_x
\bar{S}_y = \sum_{j=1}^{n_y} S_{yj} / n_y
The variances are:
s^2_{Sx} = \sum_{i=1}^{n_x} \left( S_{xi} - \bar{S}_x \right)^2
s^2_{Sy} = \sum_{j=1}^{n_y} \left( S_{yj} - \bar{S}_y \right)^2
The test statistic is:
z = \frac{1}{2}~
\frac{n_x \bar{S}_x - n_y \bar{S}_y}
{\left( \bar{S}_x \bar{S}_y + s^2_{Sx} + s^2_{Sy} \right)^{1/2}}
The two samples have significantly different location parameters,
if |z| > z_{1-\alpha/2}
.
The function calculates the p
-values of the null hypothesis
for the selected alternative than can be "two.sided"
, "greater"
or "less"
.
A list with class "htest"
.
Fligner, M. A., Pollicello, G. E. III. (1981), Robust Rank Procedures for the Behrens-Fisher Problem, Journal of the American Statistical Association, 76, 162–168.
Lanzante, J. R. (1996), Resistant, robust and non-parametric techniques for the analysis of climate data: Theory and examples, including applications to historical radiosonde station data, Int. J. Clim., 16, 1197–1226.
Siegel, S. and Castellan, N. (1988), Nonparametric Statistics For The Behavioural Sciences, New York: McCraw-Hill.
wilcox.test
## Two-sample test.
## Hollander & Wolfe (1973), 69f.
## Permeability constants of the human chorioamnion (a placental
## membrane) at term (x) and between 12 to 26 weeks gestational
## age (y). The alternative of interest is greater permeability
## of the human chorioamnion for the term pregnancy.
x <- c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46)
y <- c(1.15, 0.88, 0.90, 0.74, 1.21)
rrod.test(x, y, alternative = "g")
## Formula interface.
boxplot(Ozone ~ Month, data = airquality)
rrod.test(Ozone ~ Month, data = airquality,
subset = Month %in% c(5, 8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.