This is a collection of functions that provide test statistics to be used
into the permutation scheme for performing one-sample testing.
Usage
stat_max(data, flips, ...)
Arguments
- data
A list storing the sample from which the user wants to make
inference.
- flips
A numeric vectors of -1
s and 1
s to be used to randomly flip
some data points around the center of symmetric of the distribution of the
sample.
- ...
Extra parameters specific to some statistics.
Value
A numeric value evaluating the desired test statistic.
Examples
n <- 10
x <- as.list(rnorm(n))
flips <- sample(c(-1, 1), n, replace = TRUE)
stat_max(x, flips)
#> [1] 0.6098022