False Discovery Rate (FDR) in fuzzySim package in R

Viewed 191

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!

1 Answers

Apparently at the time of using this fuzzySim package, there was a bug in the code which is now fixed in the most updated development version (3.5) which can be installed with

install.packages("fuzzySim", repos="http://R-Forge.R-project.org")

I have confirmed that it now works with a data frame of variable names and p values.

A huge thanks to the author of this package, A. Márcia Barbosa, for updating the code. Márcia informed me that an updated package will be uploaded to CRAN later this year.

Related