Learn R Programming

PsiHat (version 1.0)

rvalue: Rvalues and qvalues.

Description

rvalue gives adjusted p-values based on qvalues, whereas nqvalue is a wrapper of function qvalue from R package qvalue with simplified output.

Usage

rvalue(pvalue, robust = FALSE, ...)
nqvalue(pvalue, robust = FALSE,...)

Arguments

pvalue
Input numeric vector of p-values.
robust
Logical. If robust=TRUE, the estimate is more robust for small p-values (see package qvalue).
...
Further arguments passed to function qvalue from R package qvalue.

Value

A list with:
LFDR.hat
Vector of estimates of the LFDR.
p0.hat
Estimated p0.
pvalue
Vector of p-values.
info
Method name and information about computation failure.

References

Padilla, M., & Bickel, D. R. (2012). Estimators of the local false discovery rate designed for small numbers of tests. Statistical Applications in Genetics and Molecular Biology, 11(5), art. 4.

Storey JD. (2002) A direct approach to false discovery rates. Journal of the Royal Statistical Society, Series B, 64: 479-498.

See Also

p0est and qvalue package.

Examples

Run this code

# a p-values vector with missing elements
pp <- runif(15) ;pp[c(13,2,5)]<-NA

z1 <-rvalue(pvalue = pp, robust = TRUE)
z2 <-rvalue(pvalue = pp, pi0.method="bootstrap")

z3<- nqvalue(pvalue = pp, robust = TRUE)
z4<- nqvalue(pvalue = pp, pi0.method = "bootstrap")


Run the code above in your browser using DataLab