blfdr: Boca-Leek False Discovery Rate

Description Usage Arguments Value Author(s) References See Also Examples

Description

A simple wrapper function to the false discovery rate controlling procedure of Boca and Leek (2018) which returns adjusted p-values. The heavy lifting of modeling the relationship between covariates and the proportion of null hypotheses is handled by the lm_pi0 function in the swfdr package.

Usage

1
blfdr(p, x, ...)

Arguments

p

numeric vector of unadjusted p-values.

x

matrix of covariates with rows corresponding to p-values p; alternatively, numeric vector for a single covariate of same length as p.

...

additional parameters to pass to lm_pi0.

Value

Numeric vector of adjusted p-values of equal length and order as the to input vector of p-values.

Author(s)

Patrick Kimes

References

Reference for the false discovery rate controlling procedure (underlying theory):

Boca, S.M., Leek, J.T. (2018) A direct approach to estimating false discovery rates conditional on covariates. bioRxiv. https://doi.org/10.1101/035675

Reference for the primary null proportion estimating function (underlying code):

Leek, J.T., Jager, L., Boca, S.M. (2018) swfdr: Science-wise false discovery rate and proportion of true null hypotheses estimation. R package version 1.6.0. https://doi.org/doi:10.18129/B9.bioc.swfdr

See Also

lm_pi0

Examples

1
2
3
4
5
6
## generate example p-values and covariate values
pv <- runif(100)
x <- sample(100)

## adjust p-values, grouping by covariate bin
adjpv <- blfdr(p = pv, x = x)

pkimes/otherfdr documentation built on May 6, 2019, 11:44 a.m.