Question: Error with fdrtool in R
0
gravatar for shawin_karim
6.6 years ago by
United Kingdom
shawin_karim0 wrote:

Iam 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 • 2.7k views
ADD COMMENTlink modified 6.5 years ago by Biostar ♦♦ 20 • written 6.6 years ago by shawin_karim0

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 REPLYlink modified 6.6 years ago • written 6.6 years ago by Devon Ryan97k

No I don't have NA value

ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by shawin_karim0

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

ADD REPLYlink written 6.6 years ago by Devon Ryan97k

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

max<-max(pval1>1) = Na
min<-min(pval1<1)= Na
ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by shawin_karim0

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

the max min function does not work on pval1??

ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by shawin_karim0

the code is:

n=40000
pval1<-vector(length=n)
pval1[1:n]= pv1list[["Pvalue"]]
fdr<-fdrtool(pval12,statistic="pvalue")
ADD REPLYlink modified 11 months ago by _r_am31k • written 6.6 years ago by shawin_karim0
1

It's unlikely that pval1 is numeric.

ADD REPLYlink written 6.6 years ago by Devon Ryan97k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1898 users visited in the last hour