Reputation: 315
I'm aware about p.adjust
function in R
and it works well for my needs. However, now i'd like to correct significance threshold (alpha)
instead of p-values
themselves according to FDR (Benjamini & Hochberg)
method.
For instance we have a ten of raw p-values:
0.0001,0.001,0.024,0.56,0.0077,0.55,0.0025,0.01,0.015,1
In case of Bonferroni it's very easy:
alpha_Bonferroni_corrected = 0.01/ number of tests (10 in our example)=0.001
But for FDR
it will be a more tricky. Is there function in R
for that?
Upvotes: 3
Views: 651
Reputation: 1086
mutoss package seems to offer greater flexibility
library(mutoss)
alpha <- 0.01
set.seed(1234)
p <-c(runif(10, min=0, max=0.01), runif(10, min=0.9, max=1))
result <- adaptiveBH(p, alpha)
result
Upvotes: 1