Hi Peter,
what did you do with your subject factor? To simplify matters, think
about the subject factor as modeling a certain way of responding that
is unique for every subject. When you are testing for condition main
effect, every subject has to be set to zero because the subjects
respond to the condition you set to +1 and they respond to the
condition you set to -1. If you are testing for main effect of group
every subject responds to two conditions. Thus, every subject has to
get the value +2 or -2 in the subject factor. So if you are looking
for group 1 > group 2, all subjects of group 1 have to be set to +2
and all subjects of group 2 have to be set to -2. The reverse is true
if you are testing for group 2 > group 1. Morover, in this case the
values for your regressors have to match the number of subjects in
your groups. So if you have 12 subjects per group and look for group 1
> group 2 your contrast vector would look like this:
2 2 2 2 2 2 2 2 2 2 2 2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 12 12 -12 -12
One expansion to my preceding mail: if you are interested in the main
effect for condition, to set your regressors to [1 -1 1 -1] is only
correct if you have the same number of subjects per group. If you have
unequal numbers, you should use these as contrast weights. For
example, if you have 14 subjects in group 1 and 10 in group 2 you
would use the following contrast weights for your regressors: [14 -14
10 -10]. To keep things simple I always use the number of subjects per
group as contrast weights for my regressors. If you were looking for
an effect of condition in group 1 in the latter example, it would make
no difference whether you use [1 -1 0 0] or [14 -14 0 0].
Cheers,
BaSti
Zitat von "Kirsch, Peter" <[log in to unmask]>:
> Hi BaSti,
>
> great to hear from you and many thanks for your very helpful
> suggestions. After reading your posting I immediately realized that
> I over specified my model which makes it senseless to test the
> contrast I defined. However, a small problem I still have is that I
> cannot test for group main effects in the model you proposed. My
> regressors are the following (G=Group, C=Condition): G1C1 G1C2 G2C1
> G2C2. I can test for condition main effects (1 -1 1 -1 and -1 1 -1
> 1) as well as for interactions (1 -1 -1 1 and -1 1 1 -1) but the
> group main effects (1 1 -1 -1 or -1 -1 1 1) do not work. I am sure
> it is again a very simple mistake but right now, I don't know which.
>
> Cheers,
>
> Peter
>
>
> -----Ursprüngliche Nachricht-----
> Von: [log in to unmask]
> [mailto:[log in to unmask]]
> Gesendet: Donnerstag, 22. Oktober 2009 12:29
> An: Kirsch, Peter
> Cc: [log in to unmask]
> Betreff: Re: [SPM] Contrast error in Flexible Factorial Design
>
> Dear Peter,
>
> if I get you right you did the following:
>
> 24 subjects overall
> 2 groups
> 2 conditions for every subject
>
> You modeled the subject factor as main effect on 2nd level.
> Then question is know how you modeled the factors group and condition.
> One good way to do this would be to model the interaction between
> group and condition.
>
> If you model your desing this way, you get 28 columns. Column 1-24 are
> the subjects. Column 25 is condition 1 for all subjects of group 1.
> Column 26 is conditon 2 for all subjects of group 1. Column 27 and 28
> are condition 1 and 2 for the subjects of group 2. If you are
> interested in condition 1 > condition 2 in group 1 your contrast
> vector would look like [zeros(1,24), 1, -1, 0, 0]. Condition 1 >
> condition 2 in group 2 would be [zeros(1,24), 0, 0, 1, -1]. These are
> simple effects, however. If you are interested in the main effect,
> your contrast vector would be [zeros(1,24), 1, -1, 1, -1].
>
> Hope that helps,
>
> BaSti
>
>
> Zitat von Peter Kirsch <[log in to unmask]>:
>
>> Dear colleagues,
>>
>> I would be very grateful if anybody would have an idea how to solve the
>> following problem:
>>
>> I set up a 3 factorial mixed effects design with 24 subjects using the
>> flexible factorial design option in SPM5. I have one wihtin-subject factor
>> (2 levels: condition) and one between-subject factor (2 levels: group). I
>> modelled the subject effect as the first factor. The design matrix was
>> estimated but when I try to calculate contrasts, SPM tells me that my
>> contrasts are invalid.
>> The first contrast is testing condition 1 > condition 2 and I defined it as
>> follows:
>> [zeros(1,24), 1, -1]
>> Any contrast with less then 25 columns is working but whenever I try to
>> define a contrast for my experimental factors, I get an error message.
>> I am quite sure that there is an answer to this in the depth of the archive
>> but unfortunately I could not find it.
>>
>> Thanks in advance for your invaluable support,
>>
>> Peter
>>
>> --
>> Peter Kirsch, PhD
>> Division for Imaging in Pychiatry
>> Central Institute of Mental Health
>> J 5
>> D-68159 Mannheim, Germany
>>
>>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
|