Search
Question: Unable to use qvalue. Estimated pi0 is <=0
0
gravatar for robandclara
2.0 years ago by
United Kingdom
robandclara0 wrote:

Dear All,

I have analysed gene expression microarray results using limma and have a list of pvalues. I want to use qvalue to look for the FDR. Every time I try to use qvalue I get the error : "ERROR: The estimated pi0 <= 0. Check that you have valid p-values or use a different range of lambda."

I have repeated my limma analysis and end up with the same results. The p values look OK to me and are all within the range 0-1. My working is as below:

library(qvalue)
> setwd("~/Desktop/mRNA arrays/")
> pvalues=read.table("pvalues.txt")
> range(pvalues)
[1] 0.000299344 0.753304443
> qobj<- qvalue(p=pvalues)
Error in pi0est(p, ...) :
  ERROR: The estimated pi0 <= 0. Check that you have valid p-values or use a different range of lambda.
>

Could anyone please explain why I am getting this message?

Thanks,

Clara Green

Clinical Research Fellow

University of Birmingham, UK

ADD COMMENTlink modified 2.0 years ago by Gordon Smyth32k • written 2.0 years ago by robandclara0
1

As James Macdonald has explained, based on the range of p-values that you show, your p-value distribution is questionable. A good place to start would be to read this article and see if your p-value distribution has any of the problems described in it: http://varianceexplained.org/statistics/interpreting-pvalue-histogram/

ADD REPLYlink written 2.0 years ago by Ryan C. Thompson6.1k
3
gravatar for James W. MacDonald
2.0 years ago by
United States
James W. MacDonald45k wrote:

The problem comes up because your range of p-values appears to be truncated at about 0.75. The expected range of p-values is (0-1], and the fact that you are missing a whole quartile of expected values is throwing the pi0est() function for a loop. The 'fix' is given in the error message, saying you need a different range of lambda (the 'stock' range is 0.05-0.95, so you get problems because your p-values have a narrower range). As an example:

> ps <- runif(3e5)
> library(qvalue)
> ps <- ps[ps < 0.75]
> qs <- qvalue(ps)
Error in pi0est(p, ...) :
  ERROR: The estimated pi0 <= 0. Check that you have valid p-values or use a different range of lambda.
> qs <- qvalue(ps, lambda = seq(0.05, 0.75, 0.05))
>

But a better question is why you have this weird distribution of p-values. That sounds pretty questionable to me, and would be worth looking into.

ADD COMMENTlink written 2.0 years ago by James W. MacDonald45k
0
gravatar for Gordon Smyth
2.0 years ago by
Gordon Smyth32k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth32k wrote:

limma already provides you with FDR values. Just call topTable() and FDR values will be in the column adj.P.Value.

I doubt that you will need this, but limma also provides ways to estimate pi0 without getting errors. See ?propTrueNull.

ADD COMMENTlink modified 2.0 years ago • written 2.0 years ago by Gordon Smyth32k

I thought the function was called propTrueNull. Was it renamed recently?

ADD REPLYlink written 2.0 years ago by Ryan C. Thompson6.1k

You're right, my typo.

ADD REPLYlink modified 2.0 years ago • written 2.0 years ago by Gordon Smyth32k
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.2.0
Traffic: 147 users visited in the last hour