# NOT RUN {
#get p-values
data(LFQRatio2)
p=LFQRatio2[,7]
#adjust p-values by estimating the proportion of true null hypotheses 
#with the "pounds" method.
res_pounds=adjust.p(p, pi0.method = "pounds")
#proportion of true null hypotheses with the "pounds" method.
res_pounds$pi0
#plot ajusted p-values in function of raw p-values
plot(res_pounds$adjp)
#adjust p-values by estimating the proportion of true null hypotheses
#using the two-stage Benjamini and Hochberg procedure with a FDR of 0.1.
res_bky=adjust.p(p, pi0.method = "bky", alpha = 0.1)
#proportion of true null hypotheses with the two-stage BH procedure.
res_bky$pi0
#plot adjusted p-values in function of raw p-values
plot(res_bky$adjp)
#compare the two-stage Benjamini and Hochberg procedure 
#with the "pounds" method
plot(res_pounds$adjp[,2],res_bky$adjp[,2])
# }
Run the code above in your browser using DataLab