# First level contrast VS 3dttest++ with -paired -AminusB

Hi!

Assuming an experiment where the subjects get two different stimuli A and B. We are interested in the contrast between A and B: C=A -B.

Normally we would have run this via afni_proc.py and defined the contrast using:

``````
-gltsym 'SYM: A -B' \
-glt_label C \

``````

This would give each subject’s stats file a sub-brik with the t-score from a t-test with null: C = 0 where C = A-B.

Let’s say we run 20 subjects and and we procede to the group level analyis. We would then run 3dttest++ where the input would be, for each subject, the coefficient for the contrast (should simply be beta(A)-beta(B) from the regression):

``````
3dttest++ -prefix C \
-setA \
stats.sub01+tlrc[C#0_Coef] \
stats.sub02+tlrc[C#0_Coef] \
...
stats.sub20+tlrc[C#0_Coef] \

``````

Is there any statistical/theoretical difference between doing this and using the -AminusB command in 3dttest++? In this example it would be:

``````
3dttest++ -prefix C -paired -AminusB \
-setA \
stats.sub01+tlrc[A#0_Coef] \
stats.sub02+tlrc[A#0_Coef] \
...
stats.sub20+tlrc[A#0_Coef] \
-setB \
stats.sub01+tlrc[B#0_Coef] \
stats.sub02+tlrc[B#0_Coef] \
...
stats.sub20+tlrc[B#0_Coef] \

``````

Are these methods doing the SAME things? Or do we in some way treat the variance differently?

If these methods are the same it would be much more flexible to use the latter method since you don’t have to re-run the afni_proc.py function the add another contrast.

Thanks!

Are these methods doing the SAME things? Or do we in some way treat the variance differently?

Yes, the two approaches should end up with the same result since you’re only taking the effect estimates (beta values) for group analysis; in other words, a paired t-test between two conditions is essentially the same as a one-sample t-test on the contrast between the two conditions.

On the other hand, if you want to take the reliability from each effect estimate (beta) into consideration at the group level (e.g., using 3dMEMA), then you would have to obtain the contrast and its t-stat and feed them into the group analysis.

Thanks! Now it makes sense.

1. Will it make a big difference to use 3dMEMA vs 3dttest++? When possible, should you always use 3dMEMA over 3dttest++?

2. We also use 3dANOVA3. Should we also replace that with 3dMEMA in some way? Or how do you include the reliability from each beta when you have a design where ANOVA is fitting?

Thank you,
Robin

1. Will it make a big difference to use 3dMEMA vs 3dttest++? When possible, should you
always use 3dMEMA over 3dttest++?

In theory 3dMEMA is preferred, but in real practice most of the time the difference is likely negligible (or subtle). You may have to try it out and see the difference.

1. We also use 3dANOVA3. Should we also replace that with 3dMEMA in some way? Or how
do you include the reliability from each beta when you have a design where ANOVA is fitting?

The approach to taking reliability into consideration at the group level is only available for t-test, not ANOVA.