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
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]]