R/pc06.fdr.R

Defines functions pc06.fdr

# pc06.fdr: Compute FDR with the Pounds & Cheng (2006) estimator of
# the proportion of tests with a true null (pi.hat)
# Reference: https://pubmed.ncbi.nlm.nih.gov/16777905/

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 April 4, 2025, 1:41 a.m.