[BioC] Contrast matrix in limma

Gordon K Smyth smyth at wehi.EDU.AU
Mon Jul 14 02:26:18 CEST 2014


Dear Kaushal Chaudhary,

The interaction is the contrast:

  IA = (diet.nodisease-nodiet.nodisease) - (diet.disease-nodiet.disease)

I don't think that the main effects have any meaningful interpretation 
in your experiment.  However they are defined by:

  Diet = (diet.nodisease-nodiet.nodisease+diet.disease-nodiet.disease)/2
  Disease = (nodiet.disease-nodiet.nodisease+diet.disease-diet.nodisease)/2

It's pretty intuitive really.  You simply add all the treatment conditions 
in which the factor is positive and subtract all the conditions in which 
the factor is negative.  In other words, the main effect for Diet is just 
the average of the Diet effects in the disease and nodisease states 
respectively.

Best wishes
Gordon

> Date: Fri, 11 Jul 2014 09:12:27 -0700 (PDT)
> From: "kaushal Chaudhary [guest]" <guest at bioconductor.org>
> To: bioconductor at r-project.org, kaushal2040 at gmail.com
> Subject: [BioC] Contrast matrix in limma
>
> Hello,
>
> In my micro array expriemt,  I have  four different types of  samples (nodiet.nodisease, nodiet.disease, diet.nodisease, and diet.disease).  I want to make the  following 5 comparisons.
> Diet.nodisease vs.  nodiet.nodisease (effect of diet  in no disease)
> Diet.disease vs. nodiet.disease  (effect of diet in disease)
> Nodiet.disease vs. Nodiet.nodiease (effect of disease in no diet)
> Diet.disease vs. Diet.nodisease (effect of disease in diet)
> Diet.disease vs. nodiet.nodisease
> I used  makecontrasts function  in limma in R.
> Contrast.matrix=makecontrasts(
>                                                 Diet.nodisease vs.  nodiet.nodisease= Diet.nodisease - nodiet.nodisease
>                                                  Diet.disease vs. nodiet.disease  = Diet.disease - nodiet.disease
>                                                  Nodiet.disease vs. Nodiet.nodiease= Nodiet.disease -Nodiet.nodiease
>                                                  Diet.disease vs. Diet.nodisease= Diet.disease - Diet.nodisease
>                                                 Diet.disease vs. nodiet.nodisease= Diet.disease -  nodiet.nodisease
>                                                  )
>
> I also want to get the main effect of diet and disease and interaction 
> at the same time. (diet, disease, diet*disease).  I suppose the code 
> gives 2 diet effects and 2 diseases effect.  I would appreciate any 
> advice.
>
> Thanks !!!

______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}



More information about the Bioconductor mailing list