They stand for the weights of those columns.

Start with the null hypothesis. In your case, 
Ho: A1=A2

From this (and statistics [N-1*K-1]=3-1*4-1=6), you will see that you need 1 rows in your contrast:
A1=A2

Each of these gets converted to a contrast by making them equal to 0.

A1-A2=0

Now you need to build this contrasts. Start by building each part, the contrast for A1 and the contrast for A2. Each of these contrasts can be built from A1B1 and A1B2 and A2B1 and A2B2, respectively. In turn each of theses contrasts are the average of the subject specific contrasts.

Here is a more complicated example of how to build contrast from the simplest elements.

Here is an example of how to construct any contrast:
This is for a design with 18 subjects in group 1, 9 subjects in group
2, 2 group terms and 2 conditions: Start with the simpliest element,
single subject in a single condition, build its contrast, repeat for
all subjects and conditions, and then combine the ones you want.

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]

Hope this helps.



Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
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 Mon, Sep 2, 2013 at 5:49 AM, Sertaç Üstün <[log in to unmask]> wrote:
Hi, I am new in SPM and I have a question. We specified our contrasts for 2X2 repeated measures ANOVA design in SPM8, like this:

a) T-test main effect of A1 > A2: "1 -1 0 0 0 0 0 0 0 .5 .5 -.5 -.5"
= "1 -1 0 0" (A1 A2 B1 B2) + "0 0 0 0 0" (Subjects) + ".5 .5 -.5 -.5" (A1B1 A1B2 A2B1 A2B2)

b) T-test main effect of B1 > B2: "0 0 1 -1 0 0 0 0 0 -.5 .5 -.5 .5"
= "0 0 1 -1" (A1 A2 B1 B2) + "0 0 0 0 0" (Subjects) + "-.5 .5 -.5 .5" (A1B1 A1B2 A2B1 A2B2)

c) F-test interaction effect of A1B1 - A1B2 ≠ A2B1 - A2B2: "0 0 0 0 0 0 0 0 0 1 -1 -1 1"
= "0 0 0 0 " (A1 A2 B1 B2) + "0 0 0 0 0 " (Subjects) + "1 -1 -1 1" (A1B1 A1B2 A2B1 A2B2)

(Source:  http://spm8.blogspot.com/2012/05/2-x-2-repeated-measures-anova.html ) 

What do 0.5 and -0.5 stand for in t-tests?