| match.pvals | R Documentation |
Constructs the observed p-values from the raw observed p-values, by rounding
them to their nearest neighbor matching with the supports of their
respective CDFs (as in function p.discrete.adjust() of package
discreteMTP, which is no longer available on CRAN).
Note: This is an internal function and has to be called directly via
:::, i.e. FDX:::match.pvals().
match.pvals(test.results, pCDFlist, pCDFlist.indices = NULL)
test.results |
either a numeric vector with p-values or an R6 object of class |
pCDFlist |
list of the supports of the CDFs of the p-values; each list item must be a numeric vector, which is sorted in increasing order and whose last element equals 1. |
pCDFlist.indices |
list of numeric vectors containing the test indices that indicate to which raw p-value each unique support in |
Well computed raw p-values should already belong to their respective CDF
support. So this function is called at the beginning of discrete.GR(),
discrete.LR(), discrete.PB() and their respective wrappers, just in
case raw p-values may be biased.
For each raw p-value that needs to be rounded, a warning is issued.
A vector where each raw p-value has been replaced by its nearest neighbor, if necessary.
discrete.GR(), discrete.LR(), discrete.PB()
## Not run:
toyList <- list(c(0.3,0.7,1),c(0.1,0.65,1))
toyRaw1 <- c(0.3,0.65)
match.pvals(toyRaw1, toyList)
toyRaw2 <- c(0.31,0.6)
match.pvals(toyRaw2, toyList)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.