# NOT RUN {
# Example 1
pi0 = 0.8
pi1 = 1-pi0
n = 10000
n.0 = ceiling(n*pi0)
n.1 = n-n.0
sim.data = c(rnorm(n.1,3,1),rnorm(n.0,0,1))
sim.data.p = 2*pnorm(-abs(sim.data))
fdr.output = p.fdr(pvalues=sim.data.p, adjust.method="BH")
fdr.output$fdrs
fdr.output$pi0
# Example 2
sim.data.p = output = c(runif(800),runif(200, min=0, max=0.01))
fdr.output = p.fdr(pvalues=sim.data.p, adjust.method="Holm", sort.results = TRUE)
fdr.output$`Results Matrix`
# }
Run the code above in your browser using DataLab