Oosting, J. (PATH) J.Oosting at lumc.nl
Tue Feb 24 17:24:35 MET 2004

Michael,

I was also struggling with this a few days ago

mt.maxT(data[,6:12], c(0,0,0,1,1,1,1), test="t") from multtest gives the raw
P values in the 3rd  column of the result
In my case that gave some concern because there were almost no low values

so I basically computed all p-values from the t.test also

mytt<-function(x,cl){
t.test(x[cl==0],x[cl==1])\$p.val
}

pvals<-apply(data[,6:12],1,mytt,cl= c(0,0,0,1,1,1,1))

Well, values turned out to be the same when doing this so I had to conclude
there was no difference between my groups there

Keep in mind that the mt.maxT returns a sorted array with lowest p-values on
top

Jan

>
> I run:
>
> > t <- mt.teststat(data[,6:12], c(0,0,0,1,1,1,1), test="t")
>
> which calculates the t statistic for my data.  The t
> statistic for my first gene comes up as:
>
> > t
>  40.60158
>
> Presumably, this is equivalent to me running t.test:
>
> > t.test(data[1,9:12], data[1,6:8], var.equal=FALSE,
> alternative="two.sided")
>
>         Welch Two Sample t-test
>
> data:  data[1, 9:12] and data[1, 6:8]
> t = 40.6016, df = 2, p-value = 0.0006061
> alternative hypothesis: true difference in means is not equal to 0
> 95 percent confidence interval:
>  1.713804 2.120092
> sample estimates:
>     mean of x     mean of y
> -1.596190e-15 -1.916948e+00
>
> So I want to know how I can get p-values for the t statistics
> I have just calculated using mt.teststat.
>