rmd.test: Ratio Mean Deviance Test

View source: R/rmd.test.R

rmd.testR Documentation

Ratio Mean Deviance Test

Description

A permutation test is performed based on the estimated RMD, the ratio of the mean of the absolute value of the deviances, for data x and y.

Usage

rmd.test(x, y, alternative = c("two.sided", "less", "greater"), 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.

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.

rmd.hat

The value of the RMD test statistic.

p.value

The p-value of the test.

Note

The formulas computed within rmd.test are based on the textbook by Higgins (2004). For each of the two original datasets x and y, the centered dataset is produced by subtracting the individual sample median. The RMD test permutes the combined data from the two centered datasets, not from the two original datasets. The p-value is referred to as exact when all possible permutations are produced exactly once, and the p-value is referred to as estimated when based on simulations.

Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA

References

Higgins, J. J. (2004) Introduction to Modern Nonparametric Statistics.

See Also

ansari.test, siegel.test, and perm.test

Examples

rmd.test( c(13, 34, 2, 19, 49, 63), c(17, 29, 22) )
rmd.test( c(13, 34, 2, 19, 49, 63), c(17, 29, 22), "greater" )

jmuOutlier documentation built on Dec. 1, 2026, 9:06 a.m.