pvalue2qvalue {ramwas} | R Documentation

## Calculate Benjamini-Hochberg q-values

### Description

Calculate Benjamini-Hochberg q-values for a vector of p-values.

### Usage

    pvalue2qvalue(pv, n = length(pv))

### Arguments

`pv` | Vector of p-values.
`n` | If `pv` has only top p-values from a bigger set, `n` should indicate the number of tests performed.

### Details

The q-values can be slightly conservative compared to other popular q-value calculation methods.

### Value

Return a vector of q-values matching p-values in `pv`.

### Note

The function runs faster if the vector `pv` is sorted.

### Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

### Examples

    pv = runif(20)^2

    qv = pvalue2qvalue(pv)

[Package ramwas version 1.14.0 Index]