I'm fairly new to R and am trying to calculate the false discovery rate for a series of t tests I ran where I want q = 0.05. It seems like the FDR function in the fuzzySim package is a nice solution, however I'm getting some error messages when I run the very examples in the fuzzySim description. For example I do...
library(fuzzySim)
df <- data.frame(var = letters[1:5], pval = c(0.02, 0.004, 0.07, 0.03, 0.05))
p_value_info <- FDR(pvalues = df, correction = "fdr", q = 0.05,
verbose = FALSE, simplif = TRUE)
And unfortunately, this is the error message I get...
Error in if (na.loss > 0) message(na.loss, " cases excluded due to missing or non-finite values.") :
argument is of length zero
Any ideas what I'm doing wrong would be greatly appreciated, thanks!