Description Usage Arguments Examples
View source: R/fastPermFunctions.R
This function approximates the p-value (two-sided) for a two sample permutation test by partitioning the permutation space. This function is most useful for small p-values, e.g. p < 10^-6.
1 |
x |
First sample |
y |
Second sample |
testStat |
Test statistic, defaults to the ratio of the means (ratioMean). Other choices are diffMean, ratioMedian, and diffMedian. In the current version, the median statistics are experimental and may not be reliable. |
B |
Number of Monte Carlo iterations within each partition. Defaults to 1,000. |
1 2 3 4 5 6 7 8 9 | x <- rexp(100, 5)
y <- rexp(100, 2)
mStopRatioMean(x, y)
fastPerm(x, y)
x <- rnorm(110, 0, 1)
y <- rnorm(110, 1, 1)
mStopDiffMean(x, y)
fastPerm(x, y, testStat = diffMean)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.