fastPermAsym: Fast approximation of small permutation p-values via...

Description Usage Arguments Examples

View source: R/fastPermAsymptoticFunctions.R

Description

This function approximates the p-value (two-sided) for a two sample permutation test by partitioning the permutation space, and using asymptotic results on the p-values within each partition. This function is most useful for small p-values, e.g. p < 10^-6, and large sample sizes.

Usage

1
fastPermAsym(x, y, testStat = ratioMean)

Arguments

x

First sample

y

Second sample

testStat

Test statistic, defaults to the ratio of the means (ratioMean). The difference in means (diffMean) is also available.

B

Number of Monte Carlo iterations within each partition. Defaults to 1,000.

Examples

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)

bdsegal/fastPerm documentation built on July 22, 2019, 1:25 p.m.