Skip to content

Instantly share code, notes, and snippets.

@mikelove
Last active August 29, 2015 14:07
Show Gist options
  • Save mikelove/e3c95819282d215df9de to your computer and use it in GitHub Desktop.
Save mikelove/e3c95819282d215df9de to your computer and use it in GitHub Desktop.
FDR calculations care about ratios of null/total
# make 10 small p-values (p = 0.01)
# and 90 big p-values (p = 0.99)
p = rep(c(.01,.99), c(10,90))
# adjust the p-values with Benjamini-Hochberg method
# and then tabulate them
table(p.adjust(p, method="BH"))
0.1 0.99
10 90
# assume we have higher resolution of the exact same signal
# simulate this by just repeating each p-value from before 100 times
p.higer.resolution = rep(p, each=100)
# adjust the p-values and tabulate
table(p.adjust(p.higer.resolution, method="BH"))
0.1 0.99
1000 9000
@mikelove
Copy link
Author

mikelove commented Oct 9, 2014

I'm not claiming that on real data there won't be a hit from multiple test correction. my point is just that increasing the number of tests doesn't necessarily hurt you in terms of power as long as the null/total ratio remains the same.

two points for real data would be:

  • the need to filter out low signal regions
  • base-pair resolution having lower signal to noise than a gene-level summary (lower counts). so rep(p, each=100) is not realistic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment