#
#
### Examples of False Discovery Rate (FDR)
#
################################################################################
# Each iteration below will create data for 200 cases across a grouping variable
# and an outcome variable; then a t-test will be applied and the t-value and
# p-value will be stored in each row of the 'results' data.frame.
n .05)
which(results$p.vals < .05)
# If you'd like to take a look at the data sets in the data list object, each can
# be identified using double brackets: [[i]]
summary(data.list[[1]])
summary(data.list[[2]])
summary(data.list[[3]])
print("...###...")
summary(data.list[[99]])
summary(data.list[[100]])
################################################################################
# Next, load the 'fdrtool' package and apply the 'fdrtool' function.
library(fdrtool)
# *Note: these functions will often return a warning when there are less than 200
# tests (i.e. p-values or test statistics supplied to the functions).
t.fdr