compute_results_finite is a helper function to compute the test
decision for the HL1-, HL2-, and MED-test when method = "randomization"
or method = "permutation".
compute_results_finite(x, y, alternative, delta, method, n.rep, type)A named list containing the following components:
the value of the test statistic.
the location estimates for both samples in case of the HL1- and the MED-tests. The estimate for the location difference in case of the HL2-tests.
the p-value for the test.
a (non-empty) numeric vector of data values.
a (non-empty) numeric vector of data values.
a character string specifying the alternative hypothesis, must be one of "two.sided", "greater", or "less".
a numeric value indicating the true difference in the location or scale parameter, depending on whether the test should be performed for a difference in location or in scale.
a character string specifying how the p-value is computed with
possible values "asymptotic" for an asymptotic test
based on a normal approximation, "permutation" for a
permutation test, and "randomization" for a randomization
test. The permutation test uses all splits of the joint sample
into two samples of sizes m and n, while the
randomization test draws n.rep random splits with
replacement. The values m and n denote the
sample sizes.
an integer value specifying the number of random splits used to
calculate the randomization distribution if method = "randomization".
a character string specifying the desired test statistic. It must
be one of "HL11", "HL12", "HL21", "HL22", "MED1",
and "MED2", where "HL1", "HL2" and
"MED" specify the location estimator and the numbers
1 and 2 the scale estimator, see the vignette
(vignette("robnptests")) for more information.