3dttest++ paired vs. subtraction

I am getting different results from 3dttest++ paired sample test and 1-sample test using differences between conditions. The subtraction method gives me a large cluster that is only present in the paired test when I significantly lower the threshold.
The reason I performed a 1-sample test using subtraction is because I am planning to run a paired test using covariates, where the covariates are different for each condition. Based on this explanation from 3dttest++ I would expect the two methods to be equivalent. Can someone help me understand which method I should be using in this case?

“++ If you want to use different covariates for setA and setB in the
paired test, then you’ll have to subtract the setA and setB
datasets (with 3dcalc), and then do a 1-sample test, using the
differences of the original covariates as the covariates for
this 1-sample test.
++ This subtraction technique works because a paired t-test is really
the same as subtracting the paired samples and then doing a
1-sample t-test on these differences.”


Melissa, it would be more informative if you paste both scripts.

Hi Gang,

Here is my code. I have 23 participants but shortened the code to display 6.


# subtract conditions for each subject
3dcalc -a ${subj}_cond1+tlrc \
-b ${subj}_cond2+tlrc \
-expr 'a-b' -prefix ${subj}_cond1-cond2+tlrc

# t-test with subtraction maps
3dttest++ -prefix ttest_cond1-cond2 \
-mask mnibrainmask_5mm.nii.gz -setA \
subj1_cond1-cond2+tlrc \
subj2_cond1-cond2+tlrc \
subj3_cond1-cond2+tlrc \
subj4_cond1-cond2+tlrc \
subj5_cond1-cond2+tlrc \

# paired t-test
3dttest++ -paired -prefix ttest_paired_cond1-cond2 \
-mask mnibrainmask_5mm.nii.gz -setA \
subj1_cond1+tlrc \
subj2_cond1+tlrc \
subj3_cond1+tlrc \
subj4_cond1+tlrc \
subj5_cond1+tlrc \
subj6_cond1+tlrc -setB \
subj1_cond2+tlrc \
subj2_cond2+tlrc \
subj3_cond2+tlrc \
subj4_cond2+tlrc \
subj5_cond2+tlrc \

Hi Melissa,

What sort of differences are you seeing? Is it basically truncation
errors? I ran such a test and that is all I saw. The results should
be almost identical, but they will not be exactly so.

What are you seeing?

  • rick

Aside from the issue of inconsistency between one-sample and paired t-test:

the covariates are different for each condition

It would be more appropriate to use linear mixed-effects model to handle the cross-subject variability in terms of the covariate effect. Check out Example 2 in the help of 3dLME.

Hi Rick,

The results look somewhat similar. A cluster of 140 voxels in one version is 30 voxels in the other. Some clusters also shifted location (i.e by 10 mm). Is this normal?

Thanks again,