Created
July 30, 2020 15:27
-
-
Save GabrielHoffman/9048d37c89d8f7b6aac72ff1f28d8ad0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(qvalue) | |
p = runif(1000, 0, 1) | |
# compute pi0, the fraction of tests where the null is supported | |
# so pi1 = 1-p0 is the fraction of tests where the null is rejected | |
# This method doesn't depend on p-value cutoffs and works even of nothing | |
# is genome-wide significant | |
pi1 = 1 - qvalue(p)$pi0 | |
# Here pi is near zero because the p-values are uniform | |
pi1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment