Dear List,
   
  I have got a very simple, I suppose, question.
  Is there any difference between the following two designs if I just want to make pairwise comparisons between three groups as in the LIMMA user guide, p.31, Affymetrix and Other Single-Channel Designs.
  1.
  > data <- ReadAffy()
  > eset <- rma(data)
  > design <- model.matrix(~ -1+factor(c(1,1,1,2,2,3,3,3)))
  > colnames(design) <- c("group1", "group2", "group3")
  > fit <- lmFit(eset, design)
  > contrast.matrix <- makeContrasts(group2-group1, group3-group2, group3-group1, levels=design)
  > fit2 <- contrasts.fit(fit, contrast.matrix)
  > fit2 <- eBayes(fit2)
   
  2. 
  > data <- ReadAffy()
  > eset <- rma(data)
  > design <- model.matrix(~ 0+factor(c(1,1,1,2,2,3,3,3)))
  > colnames(design) <- c("group1", "group2", "group3")
  > fit <- lmFit(eset, design)
  > contrast.matrix <- makeContrasts(group2-group1, group3-group2, group3-group1, levels=design)
  > fit2 <- contrasts.fit(fit, contrast.matrix)
  > fit2 <- eBayes(fit2)
   
  The only difference between the above two codes is in use of the design <- model.matrix(~ 0+factor(c(1,1,1,2,2,3,3,3))) or design <- model.matrix(~ -1+factor(c(1,1,1,2,2,3,3,3))). They produce identical design matrices and, as far as I can see, identical results in fit2. So, can we use "0" and "-1" here interchangeably?
   
  With kind regards,
  Lev.

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

	[[alternative HTML version deleted]]

