R/pc06.fdr.R

Defines functions pc06.fdr

# pc06.fdr: Compute FDR using the Pounds & Cheng (2006) estimator of
# the proportion of tests with a true null hypothesis (pi.hat).
#
# Reference:
# Pounds, S. & Cheng, C. (2006). Robust estimation of the false discovery rate.
# Bioinformatics, 22(16), 1979-1987.

pc06.fdr=function(p)
{
  pi.hat=min(1,2*mean(p,na.rm=T))
  q=pi.hat*stats::p.adjust(p,method="fdr")
  return(q)
}

Try the GRIN2 package in your browser

Any scripts or data that you put into this service are public.

GRIN2 documentation built on Aug. 22, 2026, 5:09 p.m.