Search
Question: Unable to use qvalue. Estimated pi0 is <=0
0
3.1 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/")
> 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

modified 3.1 years ago by Gordon Smyth35k • written 3.1 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/

3
3.1 years ago by
United States
James W. MacDonald48k 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.

0
3.1 years ago by
Gordon Smyth35k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth35k 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.

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