Dear List,
  On the page 49 of the LIMMA user guide there is an example of how to make a difference of differences in experiments with several factors:
   
  "Which genes respond differently in the mutant relative to the wild-type?
  > cont.dif <- makeContrasts(
  + Dif6hr =(mu.6hr-mu.0hr)-(wt.6hr-wt.0hr),
  + Dif24hr=(mu.24hr-mu.6hr)-(wt.24hr-wt.6hr),
  + levels=design)
  > fit2 <- contrasts.fit(fit, cont.dif)
  > fit2 <- eBayes(fit2)
  > topTableF(fit2, adjust="BH")"
   
  I use a very similar code to find differences between time effects and strain effects.
  I have two strains (B and W) and two different time points (2 and 1 hours). I am trying to find genes which respond differently:
  1. in B vs W, when comparing time points 1 and 2 (i.e. I compare BvsW in time point 1 to BvsW in time point 2)
  2. in time in different strains (i.e. I compare B1vsB2 versus W1vsW2) 
   
  I am getting the same results, or they should be the same?
  Could you comment on whether this is a right way to analyse time series?
   
  My code is below.
   
   
  Thank you,
  Lev.
   
  > temp<-rma(data)
  > targets <- readTargets("Targets.txt")
> lev <- c("W.1","B.1","W.2","B.2")
> f <- factor(targets$Target, levels=lev)
> design <- model.matrix(~0+f)
> colnames(design) <- lev
> fit <- lmFit(temp, design)
> cont.dif <- makeContrasts(Diff.Time=(B.2-W.2)-(B.1-W.1), Diff.Strain=(B.2-B.1)-(W.2-W.1), levels=design)
> fit2 <- contrasts.fit(fit, cont.dif)
> fit2 <- eBayes(fit2)
   
  I am getting the same results for both coefficients:
> results<-decideTests(fit2, method="separate", p=0.01, lfc=1)
> summary(results)
   Diff.Time Diff.Strain
-1        61          61
0      44951       44951
1         89          89
   
  My target file is:
  FileName         Target
  3517    W.1
  3518    W.1
  3519    W.1
  3520    W.1
  3521    W.1
  3522    B.1
  3524    B.1
  3525    B.1
  3526    B.1
  3527    W.2
  3528    W.2
  3529    W.2
  3530    W.2
  3531    B.2
  3532    B.2
  3533    B.2
  3534    B.2
   

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

	[[alternative HTML version deleted]]

