Question: Help on contrast matrix Limma
0
gravatar for Gordon Smyth
9.9 years ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:
Dear Jeremy, > Date: Wed, 23 Sep 2009 13:26:57 -0700 > From: jeremy wilson <jeremy.wilson88 at="" gmail.com=""> > Subject: [BioC] Help on contrast matrix Limma > To: bioconductor at stat.math.ethz.ch > > Hello bioconductor group, > > I am stuck with understanding how to create contrast matrix for > extracting the comparisons I need. Some seem to be easy and some I > could never understand. I am analyzing a 2factorial experiment and > found the below post useful. I have the exact same questions and would > greatly appreciate if any one can give detailed answers. > > My question from the post below pertains to > AvsN=(MUTA+ConA-MUTN-ConN)/2, levels=design) > > is AvsN also equal to (MutA-ConA)-(MutN-ConN)? Well, the usual rules of high-school algebra apply. The formula you've written obviously does not have the same value as AvsN. (You've changed the names of the variables, changed the signs, and removed the division by 2.) Why would you think they'd be the same?. > Also why did we divide the (MUTA+ConA-MUTN-ConN) by 2? So that AvsN = ((MUTA-MUTN)+(ConA-ConN))/2. MUTA-MUTN is the effect of AvsN on the mutant background. ConA-ConN is the effect of A on the control background. So AvsN as defined is the effect for A averaged over the mutant and control backgrounds. If you didn't divide by 2 then it would be the sum of the effects, which seems somewhat less interpretable. You can choose whether you want to divide or not. It makes no difference to the t-statistics or p-values. Best wishes Gordon > I got this question when I looked at the following code in Limma user > guide page 46 with the following code for exact same design > >> cont.matrix <- makeContrasts( > + WT.SvsU=WT.S-WT.U, > + Mu.SvsU=Mu.S-Mu.U,*+ Diff=(Mu.S-Mu.U)-(WT.S-WT.U)*, > + levels=design) > > Hoping to get a response from the bioconductors, > > Thanks > > Jeremy
• 585 views
ADD COMMENTlink modified 7 months ago by Bioconductor Community ♦♦ 0 • written 9.9 years ago by Gordon Smyth38k
Answer: Help on contrast matrix Limma
0
gravatar for jeremy wilson
9.9 years ago by
jeremy wilson150
jeremy wilson150 wrote:
Thanks Gordon for the helpful reply,I realize why AvsN = (MutA-ConA)-(MutN-ConN) does not make any sense. I am sorry for that stupid question, I was out of my mind! AvsN = ((MUTA-MUTN)+(ConA-ConN))/2. If we do this, I think the log fold changes would be right but if we do not divide it by two, then the coefficients or the lfcs would be double even though the t test would give the same result. Is this right? Thank you Jeremy On Thu, Sep 24, 2009 at 5:12 PM, Gordon K Smyth <smyth@wehi.edu.au> wrote: > Dear Jeremy, > > Date: Wed, 23 Sep 2009 13:26:57 -0700 >> From: jeremy wilson <jeremy.wilson88@gmail.com> >> Subject: [BioC] Help on contrast matrix Limma >> To: bioconductor@stat.math.ethz.ch >> >> Hello bioconductor group, >> >> I am stuck with understanding how to create contrast matrix for >> extracting the comparisons I need. Some seem to be easy and some I >> could never understand. I am analyzing a 2factorial experiment and >> found the below post useful. I have the exact same questions and would >> greatly appreciate if any one can give detailed answers. >> >> My question from the post below pertains to >> AvsN=(MUTA+ConA-MUTN-ConN)/2, levels=design) >> >> is AvsN also equal to (MutA-ConA)-(MutN-ConN)? >> > > Well, the usual rules of high-school algebra apply. The formula you've > written obviously does not have the same value as AvsN. (You've changed the > names of the variables, changed the signs, and removed the division by 2.) > Why would you think they'd be the same?. > > Also why did we divide the (MUTA+ConA-MUTN-ConN) by 2? >> > > So that AvsN = ((MUTA-MUTN)+(ConA-ConN))/2. MUTA-MUTN is the effect of > AvsN on the mutant background. ConA-ConN is the effect of A on the control > background. So AvsN as defined is the effect for A averaged over the mutant > and control backgrounds. If you didn't divide by 2 then it would be the sum > of the effects, which seems somewhat less interpretable. You can choose > whether you want to divide or not. It makes no difference to the > t-statistics or p-values. > > Best wishes > Gordon > > I got this question when I looked at the following code in Limma user >> guide page 46 with the following code for exact same design >> >> cont.matrix <- makeContrasts( >>> >> + WT.SvsU=WT.S-WT.U, >> + Mu.SvsU=Mu.S-Mu.U,*+ Diff=(Mu.S-Mu.U)-(WT.S-WT.U)*, >> + levels=design) >> >> Hoping to get a response from the bioconductors, >> >> Thanks >> >> Jeremy >> > [[alternative HTML version deleted]]
ADD COMMENTlink written 9.9 years ago by jeremy wilson150
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 113 users visited in the last hour