randomization.test {RATest} | R Documentation |
General Construction of Randomization Tests
Description
Calculates the randomization test. Further discussion can be found in chapter 15 of Lehmann and Romano (2005, p 633). Consider data taking values in a sample space
.
Let
be a finite group of transformations from
onto itself, with
. Let
be a real-valued test statistic such that large values provide
evidence against the null hypothesis. Denote by
the ordered values of . Let
and
define
and
be the number of values
,
, which are greater than
and equal to
respectively. Set
The randomization test is given by
Usage
randomization.test(Tn, Tng, alpha = 0.05)
Arguments
Tn |
Numeric. A scalar representing the observed test statistic |
Tng |
Numeric. A vector containing |
alpha |
Numeric. Nominal level for the test. The default is 0.05. |
Value
Numeric. A vector containing and
. The test rejects the null hypothesis if
, and does not reject otherwise.
Author(s)
Maurcio Olivares
Ignacio Sarmiento Barbieri
References
Lehmann, Erich L. and Romano, Joseph P (2005) Testing statistical hypotheses.Springer Science & Business Media.