perm_distribution: Permutation distribution for robust test statistics

View source: R/permDistribution.R

perm_distributionR Documentation

Permutation distribution for robust test statistics

Description

perm_distribution() calculates the permutation distribution for several test statistics.

Usage

perm_distribution(x, y, type, randomization = FALSE, n.rep = 10000)

Arguments

x

a (non-empty) numeric vector of data values.

y

a (non-empty) numeric vector of data values.

type

a character string specifying the desired test statistic. It must be one of "HL11" (default), "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.

randomization

a logical value indicating whether the p-value should be computed from a permutation (FALSE, default) or a randomization (TRUE) distribution.

n.rep

an integer value specifying the number of random splits used to calculate the randomization distribution if method = "randomization". The default is n.rep = 10000.

Details

Missing values in either x or y are not allowed.

Value

Vector with permutation distribution of the test statistic specified by type.


s-abbas/robTests documentation built on Feb. 20, 2023, 10:14 a.m.