bigEmpPVals: Use speed-optimized sorting to calculate p-values observed...

Description Usage Arguments Value Author(s) References Examples

Description

A reimplementation of qvalue::empPvals designed to work faster and require less memory in the average case. Unlike qvalue::empPvals, *requires* the use of a reference pool distribution rather than having this as an option. Another difference of this function that the original is that it handles ties for test statistics equal to 0, to handle cases where test statistics are thresholded and may be zero more commonly than expected by chance (i.e., very rarely).

Usage

1
bigEmpPVals(stat, stat0, increasing = TRUE)

Arguments

stat

The vector of test statistics for which p-values should be returned.

stat0

The vector or matrix of simulated null test statistics (if matrix, will be coerced to a vector).

increasing

Logical indicating whether the test statistics because more extreme as they increase in value from 0. Negative numbers are not allowed as inputs (i.e., the test statistic must be monotonic).

Value

A vector of p-values adjusted for the null statistics calculated, to be used as an input to the qvalue function.

Author(s)

John Storey, Andrew McKenzie

References

Please see ?qvalue::empPVals for more; from which this function was adapted.

Examples

1
2
3
test_stat = rnorm(100, 1, 1)
test_stat0 = rnorm(1000, 0, 1)
emp_pvals = bigEmpPVals(test_stat, test_stat0)

nosarcasm/DGCA documentation built on June 13, 2019, 11:49 p.m.