perm_pe {dearseq}R Documentation

Exact permutation p-values

Description

Calculates exact p-values for permutation tests when permutations are randomly drawn with replacement. This implementation is based on (slightly adapted) the implementation by Belinda Phipson and Gordon Smyth from the R package statmod

Usage

perm_pe(nperm_supobs, nperm_eff, total_possible_nperm)

Arguments

nperm_supobs

number of permutations that yielded test statistics at least as extreme as the observed data. Can be a vector or an array of values.

nperm_eff

number of permutations effectively computed.

total_possible_nperm

total number of permutations possible.

Value

a vector (or an array, similar to nperm_supobs) of exact p-values

Author(s)

Belinda Phipson and Gordon Smyth (adapted by Boris Hejblum)

References

Phipson B, and Smyth GK (2010). Permutation p-values should never be zero: calculating exact p-values when permutations are randomly drawn. Statistical Applications in Genetics and Molecular Biology, Volume 9, Issue 1, Article 39. http://www.statsci.org/smyth/pubs/PermPValuesPreprint.pdf

See Also

statmod::permp

Examples

perm_pe(10, 100, 1000)


[Package dearseq version 1.2.0 Index]