Print

Print


I will say I often find it easier to run separate paired t-tests to test
the A and B effects.  Also, if you do not have complete data for each
subject (they all have data for each of the 6 combos of A/B) this model
will not work properly.

Okay, here's the magical trick to extracting contrasts from ANOVA models
that use this setup (called factor effects).  The contrast information is
actually contained in the design matrix.  For example, if you look at the
two rows corresponding to A1B1 (ignore the subject-specific EV's at the
end) you'll see the design matrix rows match.  Further, it is clear that
the estimated value for the A1B1 cell (again, ignoring the subject-specific
EVs) is
-b1+b2+b3-b4-b4
Where b1-b4 are the parameter estimates.  This is a simple result of
multiplying the design matrix by the parameter vector.  I repeat, all I did
was take the row of the design matrix (after verifying all rows
corresponding to the cell A1B1 match...ignoring the subject-specific evs at
the end).

In other words, the mean of the A1B1 cell (which actually doesn't make a
whole lot of sense in a repeated measures design, but ignore that) is
obtained with the contrast: [-1 1 1 -1 -1 0 0]

Now we can use this trick to build the B1-B2 contrast.  Let's start with
B1. Average together the A1B1 and A2B1 cell means.  Start by writing down
those two contrasts
A1B1:        [-1 1 1 -1 -1 0 0]
A2B1:        [  1 1 1  1  1 0 0]  (again, just the row of the design matrix)

Average the contrasts together (add and divide by 2) to get the B1 contrast:

B1:           [0 1  1  0 0 0 0]

Now, do the same for B2

A1B2:      [-1 -1 0 1 0 0 0]
A2B2:      [1 -1 0 -1 0 0 0]

Average the contrasts

B2:    [0 -1 0 0 0 0 0]

Last B1-B2 is the difference of the two contrasts

B1 -B2= [0 1 1 0 0 0 0] - [ 0 -1 0 0 0 0 0] = [0 2 1 0 0 0 0]

Voila!

Or, as I said above, if this makes your head hurt or, more importantly, if
you don't have complete data for all subjects, just run separate paired
t-tests for A and B effects of interest.

Cheers,
Jeanette

On Wed, Feb 20, 2013 at 6:53 AM, I-Yun Chen <[log in to unmask]> wrote:

> Hi,
>
> Here's the link.
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1202&L=FSL&D=0&1=FSL&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=175856
> My question is about the contrast table at very end of those conversations.
>
> Great thanks!
>
> Cherry
>
>
> On Wednesday, February 20, 2013, Jeanette Mumford wrote:
>
>> Hi,
>>
>> What are you referring to?  Once I know what the design matrix looks
>> like, I can tell you.
>>
>> Cheers,
>> Jeanette
>>
>> On Wed, Feb 20, 2013 at 3:39 AM, Iyun Cherry Chen <[log in to unmask]>wrote:
>>
>>> Hi, FSLexperts,
>>>
>>> Sorry for keeping asking questions on this issue. I just don't get it
>>> why the contrast to test [B1-B2] effect would be [0 2 1 0 0 0]? Why do we
>>> need to multiply EV2 by 2 and take EV3 into account as well?
>>>
>>> Thanks in advance,
>>>
>>> Cherry
>>>
>>
>>