select_method {robnptests} | R Documentation |
Select principle for computing null distribution
Description
select_method
is a helper function that chooses the principle for
computing the null distribution of a two-sample test.
Usage
select_method(x, y, method, test.name, n.rep)
Arguments
x |
a (non-empty) numeric vector of data values. |
y |
a (non-empty) numeric vector of data values. |
method |
a character string specifying how the p-value is computed with
possible values |
test.name |
character string specifying the two-sample test for which the helper function is used. |
n.rep |
an integer value specifying the number of random splits used to
calculate the randomization distribution if
|
Details
When the principle is specified by the user, i.e. method
contains only
one element, the selected method is returned. Otherwise, if the user
does not specify the principle, it depends on the sample size: When both
samples contain more than 30 observations, an asymptotic test is performed.
If one of the samples contains less than 30 observations, the null
distribution is computed via the randomization principle. The number of
replications n.rep
for the randomization test needs to be specified
outside of this function. Each test function contains the argument
n.rep
where this can be done.
If n.rep
is larger than the maximum number of splits and
method = "randomization"
, a permutation test is performed.
Value
A character string, which specifies the principle for computing the null distribution.