perm_pe: Exact permutation p-values

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/perm_pe.R

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

1
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

1
perm_pe(10, 100, 1000)

dearseq documentation built on Nov. 8, 2020, 5:49 p.m.