Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rrod.test

Robust Rank-Order Distributional Test


Description

Performs Fligner-Pollicello robust rank-order distributional test for location.

Usage

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, ...)

Arguments

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 "two.sided".

formula

a formula of the form response ~ group where response gives the data values and group a vector or factor of 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").

Details

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 nx and ny of a continuous variable.First, the combined sample is transformed into ranks in increasing order. Let Sx and Sy denote the counts of Y (X) values having a lower rank than x_i (y_j). The mean counts are:

Sx = sum(Sxi) / nx

Sy = sum(Syi) / ny

The variances are:

sSxsq = sum((Sxi - Sx)^2)

sSysq = sum((Syj - Sy)^2)

The test statistic is:

z = 1/2 * (nx * Sx - ny * Sy) / (Sx * Sy + sSxsq + sSysq)^0.5

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".

Value

A list with class "htest".

References

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.

See Also

Examples

## 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))

trend

Non-Parametric Trend Tests and Change-Point Detection

v1.1.4
GPL-3
Authors
Thorsten Pohlert [aut, cre] (<https://orcid.org/0000-0003-3855-3025>)
Initial release
2020-09-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.