DescTools (version 0.99.14)

MosesTest: Moses Test of Extreme Reactions

Description

Perform Moses test of extreme reactions, which can be used to determine the difference in range between two samples. The exact one-tailed probability is calculated.

Usage

MosesTest(x, ...)

## S3 method for class 'default':
MosesTest(x, y, extreme = NULL, \dots)

## S3 method for class 'formula':
MosesTest(formula, data, subset, na.action, \dots)

Arguments

x
numeric vector of data values. x will be treated as control group. Non-finite (e.g. infinite or missing) values will be omitted.
y
numeric vector of data values. y will be treated as experiment group. Non-finite (e.g. infinite or missing) values will be omitted.
formula
a formula of the form lhs ~ rhs where lhs gives the data values and rhs 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").
extreme
integer, defines the number of extreme values to be dropped from the control group before calculating the span. Default (NULL) is the integer part of 0.05 * length(x) or 1, whichever is greater. If extreme is too large, it will be cut down to floor(lengt
...
further arguments to be passed to or from methods.

Value

  • A list with class htest containing the following components:
  • statisticthe value of the Moses Test statistic.
  • p.valuethe p-value for the test.
  • methodthe character string Moses Test of Extreme Reactions.
  • data.namea character string giving the name(s) of the data.

Details

For two independent samples from a continuous field, this tests whether extreme values are equally likely in both populations or if they are more likely to occur in the population from which the sample with the larger range was drawn. Note that the ranks are calculated in decreasing mode.

References

Moses, L.E. (1952) A Two-Sample Test, Psychometrika, 17, 239-247. http://www-01.ibm.com/support/knowledgecenter/SSLVMB_20.0.0/com.ibm.spss.statistics.help/alg_npar_tests_moses.htm

See Also

wilcox.test, ks.test

Examples

Run this code
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)

MosesTest(x, y)


set.seed(1479)
x <- sample(1:20, 10, replace=TRUE)
y <- sample(5:25, 6, replace=TRUE)

MosesTest(x, y)

Run the code above in your browser using DataCamp Workspace