[BioC] moderated t statistic in limma
Pedro López Romero
plopez at cnic.es
Fri Jul 7 10:35:23 CEST 2006
Thanks Jenny for the replay.-
I have figure out how the thinks work. Yes, first my *manual* computation
was wrong, I was using the post variance ($s2.post) instead of the
sqrt($s2.post). Moreover, I was using the unscaled std. deviation of the
coefficient estimators (alphas) instead of the contrasts estimators (betas).
Now things are ok.- Thanks,
Another example:
# my contrasts coefficients for gene[1]
> fit2$coeff[1,]
t0t2 t0t4 t0t6 t0t8 t0t12 t0t17
-1.0583707 -0.5563955 -0.1422278 -0.8344021 0.2376717 -0.2515570
# posterior variance for gene[1]
> fit2$s2.post[1]
GE102212
0.05001711
# unscaled std. deviations
> head(fit$stdev.unscaled)
ttoEFFw0 ttoEFFw2 ttoEFFw4 ttoEFFw6 ttoEFFw8 ttoEFFw12 ttoEFFw17
0.5773503 0.5773503 0.5773503 0.5773503 0.5773503 0.5773503 0.7071068
# moderated t-stat
> fit2$coeff[1,]/fit2$stdev.unscaled[1]/sqrt(fit2$s2.post[1])
t0t2 t0t4 t0t6 t0t8 t0t12 t0t17
-5.7959432 -3.0469823 -0.7788807 -4.5694269 1.3015588 -1.3775986
# moderated t-stat
> fit2$t[1,]
t0t2 t0t4 t0t6 t0t8 t0t12 t0t17
-5.7959432 -3.0469823 -0.7788807 -4.5694269 1.3015588 -1.2321617
pedro.-
-----Mensaje original-----
De: Jenny Drnevich [mailto:drnevich at uiuc.edu]
Enviado el: jueves, 06 de julio de 2006 18:26
Para: Pedro López Romero; bioconductor at stat.math.ethz.ch
Asunto: Re: [BioC] moderated t statistic in limma
Hi Pedro,
If you look at the code for 'ebayes', you'll see that the moderated t is
calculated as:
out$t <- coefficients/stdev.unscaled/sqrt(out$s2.post)
However, when I check with the numbers you show, I don't get the same
answer as your fit2$t[1] either, so I don't know what's going on with your
data:
> -0.0468 / 0.5774 / sqrt(0.5344)
[1] -0.1108756
Could a rounding issue make the resulting value that far off?
Best,
Jenny
At 06:32 AM 7/6/2006, Pedro López Romero wrote:
>Dear list
>
>I am trying to calculate the moderated t-statistic by hand for a given
>gene[i], and it is not equal to the moderated t value that eBayes ( )
>gives.-
>
>
>After fitting my model I can recover the following values for gene [1] :
>
> > fit$stdev.unscaled[1] # from lmFit (...,)
>[1] 0.5774
>
> > fit2$coeff[1] # from eBayes(...,)
>[1] -0.0468
>
> > fit2$s2.post[1]
>[1] 0.5344
>
> > fit2$t[1]
>[1] -0.1421
>
>
>and *manually* the moderated t-statistic is:
>
> > fit2$coeff[1]/(fit$stdev.unscaled[1]*fit2$s2.post[1])
>[1] -0.1517
>
>
>Did I do something wrong?
>
>Thanks a lot.-
>
>Pedro
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor
>Search the archives:
>http://news.gmane.org/gmane.science.biology.informatics.conductor
Jenny Drnevich, Ph.D.
Functional Genomics Bioinformatics Specialist
W.M. Keck Center for Comparative and Functional Genomics
Roy J. Carver Biotechnology Center
University of Illinois, Urbana-Champaign
330 ERML
1201 W. Gregory Dr.
Urbana, IL 61801
USA
ph: 217-244-7355
fax: 217-265-5066
e-mail: drnevich at uiuc.edu
More information about the Bioconductor
mailing list