powered by
This is a collection of functions that provide test statistics to be used into the permutation scheme for performing one-sample testing.
stat_max(data, flips, ...)
A numeric value evaluating the desired test statistic.
A list storing the sample from which the user wants to make inference.
A numeric vectors of -1s and 1s to be used to randomly flip some data points around the center of symmetric of the distribution of the sample.
-1
1
Extra parameters specific to some statistics.
n <- 10 x <- as.list(rnorm(n)) flips <- sample(c(-1, 1), n, replace = TRUE) stat_max(x, flips)
Run the code above in your browser using DataLab