Error with fdrtool in R
0
0
Entering edit mode
10.1 years ago

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 • 3.6k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

No I don't have NA value

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

max<-max(pval1>1) = Na
min<-min(pval1<1)= Na
ADD REPLY
0
Entering edit mode

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

the max min function does not work on pval1??

ADD REPLY
0
Entering edit mode

the code is:

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

It's unlikely that pval1 is numeric.

ADD REPLY

Login before adding your answer.

Traffic: 1645 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6