[BioC] opposite signs in limma

Jihoon Kim jihoon at stat.wisc.edu
Tue Aug 2 21:16:14 CEST 2005


Dear Dr.Smyth,


I'm struggling with limma to apply it to two-group microarray data.
I thought ebayes() in limma shrinks the variance but not the "sign"
of the original t-statistic. However, example code resulted in opposite
signs of the moderated T statistic and  the mean difference
in the gene 1(or the row 1).

I tried to follow example code in limma.
What seems to be problem here?
Thank you in advance.


Best,


Jihoon Kim


--------------------------------------------------------------


library(limma)


exprVec <- c(
   1.5522,   1.6881,  1.0798,     1.3877,   0.8566,   1.4138,
   1.5729 ,  1.3380,   2.2301,    1.8566,   2.0400 ,  1.6191,
 -1.6955,  -1.2777, -1.4938,  -1.7326, -1.5530,  -1.7169,
 -0.1812,    0.0399,   0.0413,  -0.3797, -0.4582,  -0.6490,
 -0.3439,  -0.2067, -0.0792,    0.0549, -0.1200,   0.4584,
 -0.2357,  -0.5873, -0.0446,  -0.1868,   0.2710,  -0.2091,
 -0.5146,  -0.1384, -0.1525 ,   0.0089,   0.5896,   0.2688,
  0.2017,     0.1631,  -0.1724, -0.5886, -0.1346, -0.3309 )
Mat <- matrix( exprVec,  nrow=4,  ncol=12, byrow=TRUE)
design.eb <- cbind(   time1=c( rep(1, 6), rep(0, 6)),
                     time2=c( rep(0, 6), rep(1, 6))     )
fit <- lm.series(Mat, design=design.eb)
eb <- ebayes(fit)
modT <- eb$t[,1]

meanDiff <- rep(0, 4)
for(i in 1:3) {
   meanDiff[i] <- mean( Mat[i, 1:6] )  - mean( Mat[i, 7:12] )
}


cbind(modT, meanDiff)

plot(1:12, Mat[1,], type="b")



More information about the Bioconductor mailing list