check_test_input | R Documentation |
check_test_input
is a helper functions that contains checks for the
input arguments of the two-sample tests.
check_test_input( x, y, alternative, delta, method, scale, n.rep, na.rm, scale.test, wobble, wobble.seed, gamma = NULL, psi = NULL, k = NULL, test.name )
x |
a (non-empty) numeric vector of data values. |
y |
a (non-empty) numeric vector of data values. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided", "greater", or "less". |
delta |
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. |
scale |
a character string specifying the scale estimator used for
standardization in the test statistic; must be one of |
n.rep |
an integer value specifying the number of random splits used to
calculate the randomization distribution if |
na.rm |
a logical value indicating whether NA values in |
scale.test |
a logical value testing whether the samples should be compared for a difference in scale. |
wobble |
a logical value indicating whether the sample should be checked
for duplicated values that can cause the scale estimate to be zero.
If such values are present, uniform noise is added to the sample,
see |
wobble.seed |
an integer value used as a seed for the random number
generation in case of |
gamma |
a numeric value in [0, 0.5] specifying the fraction of observations to be trimmed/replaced from each end of the sample before trimmed mean/winsorized variance. |
psi |
kernel used for optimization in the computation of the M-estimates.
Must be one of |
k |
tuning parameter(s) for the respective psi function. |
test.name |
character string specifying the two-sample test for which the helper function is used. |
The two-sample tests in this package share similar arguments. To reduce the
amount of repetitive code, this function contains the argument checks so that
only check_test_input
needs to be called within the functions for
the two-sample tests.
The scale estimators "S1"
and "S2"
can only be used in
combination with test.name = "hl1_test"
or test.name = "hl2_test"
.
The estimators "S3"
and "S4"
can only be used with
test.name = "med_test"
.
An error message if a check fails.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.