Hi Nick,
> As you can see,
Unfortunately, I can't! I guess the mailing list stripped the
attachment as being too large? If you could put it somewhere on the
web that would be cool. If not, I'd be happy to take a look if you
email it directly to me. I'll have a bit of a guess anyway...
> I've specified a main effect for subject, producing the
> 19, staggered, steplike columns. After these, there are four columns
> (the modeled interaction). The first two columns refer to the first
> level of the betweensubjects effect. The last two columns refer to the
> second level of the betweensubjects effect. Columns 1 and 3 refer to
> the first level of the withinsubjects effect; Columns 2 and 4 refer to
> the second level of the withinsubjects effect.
If I've understood this correctly, the last four columns are then:
A1 A2 B1 B2
where A/B is a betweensubjects factor (like group maybe), and 1/2 is
a withinsubjects factor (perhaps like time).
Following the post I've just sent to Fatima, are your subjects nested
inside your between subjects factor? e.g. do you have group 1 with
subjects 110 and group 2 with subjects 1119? If so, then I don't
think you can test the main effect of group, since the different
subjects already model the group difference.
> I can test both of the interaction's contrasts:
> [1 1 1 1]
> [1 1 1 1]
Fatima, if you're reading, I guess you could probably create a similar
design matrix, and use the same contrast for your interaction.
Possibly, Nick, you just modelled the interaction of your two factors,
and no main effect for either, right? This probably makes the design
matrix simpler to interpret than if you have both, though it partly
depends on how SPM decides to treat things, and I haven't checked this
myself. I would guess the two of you may be able to help each other
here more than I can help either of you...
> I can NOT test either of the betweensubjects contratsts:
> [1 1 1 1]
> [1 1 1 1]
I think this makes sense. The withinsubjects factor and its
interaction with the betweensubjects one are the main things to ask
about. (Though see my more speculative bit later on...)
If you're interested in the algebra as to why SPM is complaining. It's
that a contrast must be in the rowspace of the design matrix in order
to be estimable. A single subject has rows like the following in your
design matrix (if I've interpreted it correctly), e.g. for the third
of 19 subjects, in group 1:
0 0 1 zeros(1,16) 1 0 0 0
0 0 1 zeros(1,16) 0 1 0 0
and for the 19th subject, in group 2:
zeros(1,18) 1 0 0 1 0
zeros(1,18) 1 0 0 0 1
now, you can build e.g.
zeros(1,19) 1 1 1 1
as follows: first subtract the first row from the second for a group1
subject to get:
zeros(1,19) 1 1 0 0
then subtract the first row from the second for a group2 subject for:
zeros(1,19) 0 0 1 1
noting that all the ones in the first 19 (subject) columns have
cancelled. Now, you simply add these results (rather like averaging
the withinsubject effects over the groups/subjects). Similarly, you
could subtract them to get the interaction that you found was valid.
However, if you instead add the two rows for the withinsubjects
levels, you'd get (for the two subjects considered above):
0 0 2 zeros(1,16) 1 1 0 0
zeros(1,18) 2 0 0 1 1
then if you tried to subtract the first from the second to get [1 1
1 1] contrast, you'd instead end up with:
0 0 2 zeros(1,15) 2 1 1 1 1
since the subject effects won't cancel in this case.
Okay, hopefully that's reasonably clear, and also something I'm
reasonably confident of. Now for something I'm not...
I think the above logic shows that a contrast like:
ones(1,10)/10 ones(1,9)/9 1/2 1/2 1/2 1/2
would be estimable (here assuming 10 subjects in group1 and 9 in
group2, but easily altered).
Possibly, such a contrast might be a sensible way of testing the main
"group effect", since it's averaging over the subjects in each group,
which perhaps gets around my point that you can't separate the group
effect if your different subjects already allow you to model a group
difference... I'm afraid though, I'm really out of my depth here...
I'm not sure if the above is sensible. Perhaps a statistician can help
here? (note that this is an entirely general nonimagingspecific GLM
question, in my opinion). Also, maybe you could take a look at this
for your data, and see if it appears to be, first, a valid contrast,
and second, give reasonable results? Do please mail the list (and
maybe CC me) if you find anything.
> Markus Lonsdale also posted recently with a similar problem in a PET
> study, I've copied his post below (sorry I couldn't figure out how to
> paste the URL without it going through my username):
For future reference, I think you can just delete the bit of the URL
that says something like: &Y=drc.spm%40googlemail.com but for your
email address. In fact, you can delete all the &something=something
bits except for &L=spm&P=posting_number
> we try to analyse a PET study with 2 groups of subjects in 2
> conditions. The idea is to look at group differences in each condition
> as well as in the response to the conditions.
>
> We have tried to model this as flexible factorial, 2 factors
> (subjects, conditions), 2 main effects (subjects, conditions) with an
> interaction between the two. (The idea is to define a contrast where
> we can "pick out" the subjects according to their group.)
>
> However, no contrasts are accepted by the contrast manager, not even
> the simple contrast "condition1  condition2"!?!
I think I'd have to see the design matrix for this, I'm afraid. I
would certainly expect *some* contrasts to be estimable! I think
perhaps it is enough just to model the interaction, and not the main
effects, because of the way SPM uses a column for each level of a
factor. (note that if you have a mean column, and/or a bunch of
subject columns, there is a redundancy if you then have a column for
each level of a factor, since one of the level's columns would then be
equivalent to the mean minus the other levels' columns. Possibly
Markus' problem is that these redundancies multiply up with the two
main effects and interaction, to give a heavily redundant design
matrix, with confusing contrasts; your design matrix is still
rankdeficient (otherwise all contrasts would be estimable), but much
less so)
I hope at least some of the above is useful...
Ged.
