This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error with fdrtool in R

I am using frdtool for estimating FDR for my pvalue but I have an error which is:

Error in if (max(x) > 1 | min(x) < 0) stop("input p-values must all be in the range 0 to 1!") :
  missing value where TRUE/FALSE needed

the p value are not less that 0, and greater than 1 the range of p value are [1,0]

r

Do you happen to have at least one NA value in there (just run table( is.na(foo)) to see if foo contains an NA)? That'd cause this.

No I don't have NA value

Then what's the output of table(max(x)>1) and table(min(x)<1)?

I have a vector pval1 and its for the p values:

max<-max(pval1>1) = Na
min<-min(pval1<1)= Na

when I max(pval1) the result is NA also for min function

the max min function does not work on pval1??

the code is:

n=40000
pval1<-vector(length=n)
pval1[1:n]= pv1list[["Pvalue"]]
fdr<-fdrtool(pval12,statistic="pvalue")

It's unlikely that pval1 is numeric.

0 answers

No answers yet.

Log in to answer this question.