pvalue2qvalue: Calculate Benjamini-Hochberg q-values

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/ramwas.r

Description

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

Usage

1
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

1
2
3
pv = runif(20)^2

qv = pvalue2qvalue(pv)

andreyshabalin/ramwas documentation built on Sept. 27, 2021, 7:25 p.m.