bigEmpPVals | R Documentation |
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).
bigEmpPVals(stat, stat0, increasing = TRUE)
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). |
A vector of p-values adjusted for the null statistics calculated, to be used as an input to the qvalue function.
John Storey, Andrew McKenzie
Please see ?qvalue::empPVals for more; from which this function was adapted.
test_stat = rnorm(100, 1, 1)
test_stat0 = rnorm(1000, 0, 1)
emp_pvals = bigEmpPVals(test_stat, test_stat0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.