[BioC] Two-way ANOVA with multtest's MTP/EBMTP

James W. MacDonald jmacdon at med.umich.edu
Wed Jan 19 23:37:49 CET 2011


Hi Neil,

On 1/19/2011 4:12 PM, Neil Gray wrote:
> Hello - hopefully a quick question here. I've been using the MTP and
> EBMTP functions for multiple testing correction of microarray expression
> data. I've had no problems using the t-test option, but my overall
> design is a two-factor ANOVA (2x2 groups using two different
> treatments). My eSet therefore has two phenoData slots, and while it's
> easy enough to specify one or the other, e.g., test='t.twosamp.equalvar'
> and Y='treatment1', but I don't understand how to specify the 2x2 design
> for test='f.twoway'. It seems Y can't be a matrix, and it can only be of
> length equal to the number of samples.

Yes. From ?MTP:

Y: A vector, factor, or 'Surv' object containing the outcome of
           interest. This may be class labels (F-tests and two sample
           t-tests) or a continuous or polycotomous dependent variable
           (linear regression based t-tests), or survival data (Cox
           proportional hazards based t-tests). For 'block.f' and
           'f.twoway' tests, class labels must be ordered by block and
           within each block ordered by group. If 'X' is an
           ExpressionSet, 'Y' can be a character string referring to the
           column of 'pData(X)' to use as outcome. Default is 'NULL'.

So for f.twoway, you need a factor, with the class labels ordered correctly.

Let's say you have something like this:

 > trt <- rep(c("trt","untrt"), each=6)
 > typ <- rep(c("wt","ko"), each=3, times=2)
 > cbind(trt,typ)
       trt     typ
  [1,] "trt"   "wt"
  [2,] "trt"   "wt"
  [3,] "trt"   "wt"
  [4,] "trt"   "ko"
  [5,] "trt"   "ko"
  [6,] "trt"   "ko"
  [7,] "untrt" "wt"
  [8,] "untrt" "wt"
  [9,] "untrt" "wt"
[10,] "untrt" "ko"
[11,] "untrt" "ko"
[12,] "untrt" "ko"

To get the factor, I believe you need something like this:

 > my.y <- factor(paste(trt,typ, sep = ""))
 > my.y
  [1] trtwt   trtwt   trtwt   trtko   trtko   trtko   untrtwt untrtwt 
untrtwt
[10] untrtko untrtko untrtko
Levels: trtko trtwt untrtko untrtwt

Does that make sense?

Best,

Jim



>
> So, given that 12 samples with groups defined as
> treatment1=c(0,0,0,0,0,0,1,1,1,1,1,1) and
> treatment2=c(0,0,0,1,1,1,0,0,0,1,1,1), how do I pass this design to MTP?
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 



More information about the Bioconductor mailing list