[BioC] p.value in eBayes( ) of limma

Gordon K Smyth smyth at wehi.EDU.AU
Sat Jul 23 14:34:15 CEST 2005


> Date: Fri, 22 Jul 2005 08:14:53 -0500 (CDT)
> From: jihoon at cs.wisc.edu
> Subject: [BioC] p.value in eBayes( ) of  limma
> To: smyth at wehi.EDU.AU
> Cc: bioconductor at stat.math.ethz.ch
>
> Dear Smyth,
>
> Hello,
>
> I'm curious about how p-value is calculated
> (or which degree of freemdom is used)
> from the R example of the function lm.series
> in the package "limma" below.
>
>
>
> [R Example as in help page]
> M <- matrix(rnorm(100*6,sd=0.3),100,6)
> M[1,1:3] <- M[1,1:3] + 2
> #  Design matrix includes two treatments,
> # one for first 3 and one for last 3 arrays
> design <- cbind(First3Arrays=c(1,1,1,0,0,0),Last3Arrays=c(0,0,0,1,1,1))
> fit <- lm.series(M,design=design)
> eb <- ebayes(fit)
> #  Large values of eb$t indicate differential expression
> qqt(eb$t[,1],df=fit$df+eb$df.prior)
> abline(0,1)
>
>
>
> I thought following two codes should give same
> results, but they didn't.
> Which degree of freedom should I use to get
> the same p.value?
>
>
> eb$p.value[1,1]
> 1-pt(eb$t[1,1], fit$df[1]+eb$df.prior)

You are computing a one-sided p-value whereas limma computes two-sided p-values.

Gordon

> Thank you.
>
>
> Jihoon Kim



More information about the Bioconductor mailing list