Entering edit mode
Ann Hess
▴
340
@ann-hess-251
Last seen 10.2 years ago
I am using the function mt.teststat (from multtest package) in R2.2
with
BioC 1.7.
When I use mt.teststat(test="t") or mt.teststat(test="t.equalvar") I
get the
same results (which assumes EQUAL variances). See code below.
Am I making some mistake or could there be a bug in the function?
Ann
**************************
cl<-c(1,1,0,0,1,0)
test1<-mt.teststat(exprs(data),cl,test="t")
test2<-mt.teststat(exprs(data),cl,test="t.equalvar")
test1[1:10]
# -1.7941959 -0.8467331 -1.0077421 -0.3012158 2.4909231
test2[1:5]
# -1.7941959 -0.8467331 -1.0077421 -0.3012158 2.4909231
#Variances are NOT EQUAL:
var1.1<-var(exprs(data)[1,c(1:2,5)])
var1.2<-var(exprs(data)[1,c(3:4,6)])
var1.1
# 43
var1.2
# 305.33
#Test statistic uses POOLED t-test:
mean1.1<-mean(exprs(data)[1,c(1:2,5)])
mean1.2<-mean(exprs(data)[1,c(3:4,6)])
sp.1<-sqrt( (2*var1.1 + 2*var1.2)/4 )
t.1<- (mean1.1-mean1.2)/(sp.1*sqrt(2/3))
t.1
# -1.794196