match.pvals: Matching Raw P-Values with Supports

View source: R/Aux_fun.R

match.pvalsR Documentation

Matching Raw P-Values with Supports

Description

[Deprecated]

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: In the next version, this is to become an internal function and will have to be called directly via :::, i.e. DiscreteFDR:::match.pvals().

Usage

match.pvals(pCDFlist, raw.pvalues, pCDFlist.indices = NULL)

Arguments

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.

raw.pvalues

numeric vector with raw p-values for which a discrete FDR procedure is to be performed.

pCDFlist.indices

list of numeric vectors containing the test indices that indicate to which raw p-value each unique support in pCDFlist belongs; ignored if the lengths of test.results and pCDFlist are equal.

Details

Well computed raw p-values should already belong to their respective CDF support. So this function is called at the beginning of discrete.BH(), DBH(), ADBH() and DBR(), just in case raw p-values are biased.

For each raw p-value that needs to be rounded, a warning is issued.

Value

A vector where each raw p-value has been replaced by its nearest neighbor, if necessary.

See Also

discrete.BH(), DBR()

Examples

## Not run: 
toyList <- list(c(0.3,0.7,1),c(0.1,0.65,1))
toyRaw1 <- c(0.3,0.65)
match.pvals(toyList,toyRaw1)
toyRaw2 <- c(0.31,0.6)
match.pvals(toyList,toyRaw2)

## End(Not run)


DiscreteFDR documentation built on Sept. 11, 2024, 9:17 p.m.