Hi there, I have a doubt:
I'm adjusting multiple independent ttests with BH (having quite a lot of comparisons and being FDRs a bit more lenient) but when I adjust the pvalues the results seems odd to me.
Code to for ttests (and get pvalues as a vector so that I can then use it to adjust)
prandom <- data.frame(p.value= sapply(random[,5:77], function(i) t.test(i ~ random$Group)$p.value))
print(prandom)
which(prandom$p.value < 0.05)
x <- (prandom$p.value)
corrected <- p.adjust(x, method = "BH")
the result of x is:
[1] 0.007319452 0.044712307 0.059936099 0.081492910 0.085423931 0.108844961 0.134041535 0.216181963 0.225669850
[10] 0.229112552 0.264940706 0.266180569 0.316797423 0.321418692 0.338581157 0.358322392 0.361364009 0.381420023
The result of corrected is:
[1] 0.5343200 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560
[12] 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560 0.9737560
I have a feeling I am doing something wrong but maybe it's me being too cautious.
Many thanks