Hi Matt
> -----Original Message-----
> From: SPM (Statistical Parametric Mapping)
> [mailto:[log in to unmask]] On Behalf Of Matt Shane
> Sent: Thursday, January 03, 2008 1:33 PM
> To: [log in to unmask]
> Subject: Re: [SPM] questions on perfroming 2 x 2
> within-subjects ANOVA in SPM5
>
> Not to beat a dead horse, but given that my question has
> spawned quite a discussion and identified several other
> people with the same problem, I thought I'd add a bit more to
> the ongoing discussion. I thought I'd also explicitly ask
> whether or not this might be a bug in SPM5. Has anyone else
> encountered this problem as well? Has anyone *not*
> encountered this problem when using the flexible-factorial design?
>
> Anyone who has followed this thread may not need to reread
> the gory details of my setup and problem. And so I'll restate
> it only very briefly. My .mat file is also attached.
>
> My design (which is very much like Darren's) used a
> flexible-factorial design with 3 factors: Subject, Group and
> TrialType. Independence: yes, yes, no; Variance: equal,
> unequal, unequal. My resultant condition matrix (which is
> also set up almost the same as Darren's, except that I have 3
> groups) is:
>
> [ 1 1
> 1 2
> 1 3
> 2 1
> 2 2
> 2 3]
>
> I have explicitly modeled a main effect of Subject (as I
> believe is necessary to make it a within-subject design), and
> also a Group x TrialType interaction.
>
> The problem occurs at the level of the contrast manager. In
> short, it seems to me that:
>
> 1. Any contrast that does not balance the positive and
> negative values is said to be 'invalid'. (ie. any contrast
> against the implicit baseline cannot be performed)
true. this is because you have to deal with those subject effects columns,
which make the design matrix rank deficient. You will notice that you end up
modeling the same scans in two different ways. The subject columns all add
up to a mean of 1 and the interaction columns also add up to 1 (before the
matrix is estimated and sphericity and filtering effects are imposed).
>
> 2. Any contrast that spans across Factors in the design
> matrix is 'invalid'. Thus:
>
> Contrasting Subject 1 to Subject 23 is VALID Contrasting
> TrialType 1 to TrialType 3 is VALID Contrasting Group 1 to
> Group 2 is VALID
>
> Contrasting Group 1/TrialType 1 to Group 1/TrialType 2 is
> INVALID Contrasting Group 1/TrialType 1 to Group 2/TrialType
> 1 is INVALID
unless you deal with the subject means
> I believe that the second problem is actually a subset of the
> first problem. That is, I think that any contrast in which
> the positive and negative values are not balanced *per
> factor* will be marked as invalid. Darren: I think this
> explains why your 1 0 -1 -1 0 1 contrast was valid, but your
> 1 1 1 -1 -1 -1 contrast was not.
the first is valid because the differences are within the groups, the second
is invalid because the differences are between groups and I didn't deal with
the subject means.
so for me the main effect of group: grp 1 > grp 2
3*1/9*ones(1,9) -3*1/12*ones(1,12) 1 1 1 -1 -1 -1
and grp 2 > grp 1
-3*1/9*ones(1,9) 3*1/12*ones(1,12) -1 -1 -1 1 1 1
The main effect of condition is done as an F test.
zeros(1,9) 1 -1 0 1 -1 0
zeros(1,12) 0 1 -1 0 1 -1
The interaction would be something like
zeros(1,21) 1 -1 0 0 -1 1 and so on.
The number 3 is how many conditions you are including in the contrast. If
instead of all three conditions I only want to include 1 I would write.
1/9*ones(1,9) -1/12*ones(1,12) 1 0 0 -1 0 0
I hope this is helpful,
Darren
|