match.pvals {DiscreteFDR} R Documentation

## Matching raw p-values with supports

### Description

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). The end user should not use it.

### Usage

match.pvals(pCDFlist, raw.pvalues)


### Arguments

 pCDFlist a list of the supports of the CDFs of the p-values. Each support is represented by a vector that must be in increasing order. raw.pvalues vector of the raw observed p-values, as provided by the end user and before matching with their nearest neighbor in the CDFs supports.

### Details

Well computed raw p-values should already belong to their respective CDF support. So this function is called at the beginning of 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.

This version: 2017-08-16.

### Value

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

discrete.BH, DBR

### Examples

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)



[Package DiscreteFDR version 1.3.6 Index]