[zeros(1,27) 0 0 zeros(1,7) 1 -1 0 0 0 0 0 -1 1 0 0 0 0 0]


There is a file called conweights floating around on the SPM list that has more detail, but below is a good way to do it.

S1G1C1=[1 zeros(1,26) 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
S1G1C2=[1 zeros(1,26) 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
....
Now average your G1C1 and by summing and dividing by the number of subjects, you'd get
G1C1=[ones(1,18)/18 zeros(1,9) 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
and
G1C2=[ones(1,18)/18 zeros(1,9) 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
and
G2C1=[zeros(1,18) ones(1,9)/9 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
and
G2C2=[zeros(1,18) ones(1,9)/9 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]

Now subtract G1C1-G1C2 AND G2C2-G2C1
G1C1-G1C2=[zeros(1,27) 0 0 1 -1 0 0 0 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0]
and
G2C1-G2C2=[zeros(1,27) 0 0 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0]

Now subtract these two:
Interaction contrast=[zeros(1,27) 0 0 0 0 0 0 0 0 0 1 -1 0 0 0 0 0 -1 1 0 0 0 0 0]

And enter it into SPM.

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Postdoctoral Research Fellow, GRECC, Bedford VA
Research Fellow, Department of Neurology, Massachusetts General Hospital and Harvard Medical School
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is intended only for the use of the individual or entity named above. If the reader of the e-mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that you are in possession of confidential and privileged information. Any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited and may be unlawful. If you have received this e-mail unintentionally, please immediately notify the sender via telephone at (773) 406-2464 or email.


On Fri, Nov 5, 2010 at 2:54 PM, Christiane Arnold <[log in to unmask]> wrote:
 

Dear SPM er`s



I wanted to define my contrasts, aber having estimated my flexible factorial design in the ANOVA and to test for two single regressors in the interaction group and condition: (interaction main effect [2 3]).


For example: the following contrast in the interaction: group1 condition 1 negativly and condition2  positivly against group 2 condition 1positivly and condition2 negativly contrasted against each other (-1 1 0 0 0 0 0  1 -1 0 0 0 0 0) as you can see in the appendage. But I don´t know how to set up the contrast weights for the subjects, groups and the conditions in the designed matrixas well as for the interaction.

Everything I tried, there popped up the advice: “Invalide error”


subjects: 27

group 1: 18

group 2: 9

conditions: 7


In the web, I found an example for contrast weights in flexible factorial designs with multiple groups of subjects - a test for two single regressors in the interaction group and condition, they here say:

ones (1, n1+n2)/ (n1*n2) n1/(n1+n2) n2/(n1+n2) 100 n1/(n1+n2) 00 n2/(n1+n2) 00.

I didn`t really understood this exactly, but I tried this without success -> always the error message popped up.

Do you have any idea how to enter the contrasts correctly.

Thank you very much for your efforts.

Best regards,
Christiane Arnold

University of Frankfurt am Main

Clinic of Neurology

Brain Imaging Center - Cognitive  Neuroscience

Schleusenweg 2-16

60528 Frankfurt am Main

  

GRATIS! Movie-FLAT mit über 300 Videos.    
Jetzt freischalten unter http://movieflat.web.de