Im just trying to get my head around Benjamini + Hochberg multiple testing using the p.adjust approach in R. So is the BH mutliple testing option (pval *no of tests)/rank ?
I have a dummy dataset and bonferroni multiple testing works as should
pvals = c(2.335810e-07, 4.820826e-07, 4.820826e-07, 5.807533e-07, 5.807533e-07,6.954857e-07) pval2=as.numeric(pvals) BONF = p.adjust(pval2, "bonferroni") head(BONF)  1.401486e-06 2.892496e-06 2.892496e-06 3.484520e-06 3.484520e-06  4.172914e-06
However, when I try the Benjamini and Hochberg option the adjusted pvalues are all the same
BH = p.adjust(pval2, "BH") head(BH)  6.954857e-07 6.954857e-07 6.954857e-07 6.954857e-07 6.954857e-07  6.954857e-07
If there is any advice on what Im doing wrong it would be much appreciated or if anybody knows the exact formula p.adjust uses for BH as well.