small 3dClustSim threshold


I am currently working on a rt-fMRI project where we have 21 participants. Each participant completed two runs of the experimental condition and had 167-169 volumes per run. We created a grey matter mask. Then we utilized 3dLME, 3dFWHMx, and 3dClustSim to create thresholds and activation maps.

3dLME -prefix Arouse -jobs 16 \\
      -resid 'lme_arouse_resid' \\
      -mask /home/derivatives/mri/gm_mask/group_gm_mask.nii \\
      -model 'arouse' \\
      -ranEff '~1' \\
      -num_glt 1 \\
      -gltLabel 1 'ON-OFF' -gltCode 1 'arouse : 1*ON -1*OFF' 
      -dataTable Subj run arouse InputFile

We used the residual file provided by the 3dLME calculation
3dFWHMx -acf -input lme_arouse_resid+tlrc

++ 3dFWHMx: AFNI version=AFNI_19.1.04 (Apr 21 2019) [64-bit]
++ Authored by: The Bob
*+ WARNING: removed 262170 voxels from mask because they are constant in time
++ start ACF calculations out to radius = 12.00 mm

  • ACF done (0.00 CPU s thus far)
    ** ERROR: (FAILED) attempt to over-write file 3dFWHMx.1D
    ++ ACF 1D file [radius ACF mixed_model gaussian_NEWmodel] written to 3dFWHMx.1D
    ++ 1dplot: AFNI version=AFNI_19.1.04 (Apr 21 2019) [64-bit]
    ++ Authored by: RWC et al.
  • and 1dplot-ed to file 3dFWHMx.1D.png
    [‘0.57608’, ‘1.62374’, ‘6.44495’, ‘4.70654’]
    ++ 3dClustSim: AFNI version=AFNI_19.1.04 (Apr 21 2019) [64-bit]
    ++ Authored by: RW Cox and BD Ward
    ** AFNI converts NIFTI_datatype=64 (FLOAT64) in file derivatives/mri/gm_mask/group_gm_mask.nii to FLOAT32
    Warnings of this type will be muted for this session.
    Set AFNI_NIFTI_TYPE_WARN to YES to see them all, NO to see none.
    ++ 34639 voxels in mask (10.65% of total)
    ++ Kernel function radius = 19.68 mm
    ++ ACF(0.58,1.62,6.44) => FWHM=4.67 => 65x77x65 pads to 80x96x80
  • Kernel image dimensions 39 x 47 x 39
    ++ Startup clock time = 0.2 s
    ++ Using 15 OpenMP threads
    ++ Clock time now = 192.3 s

We used the acf parameters to calculate the cluster size:
3dClustSim -acf 0.58 1.62 6.44 -nxyz 54 64 50 -pthr 0.001 -athr 0.05 -mask '+
p.path_mri_gm_mask + 'group_gm_mask.nii -prefix ’ + p.path_code + 'clust_size_arouse_new

This was the afni output:

3dClustSim -acf 0.576086 1.62376 6.44507 -nxyz 54 64 50 -pthr 0.001 -athr 0.05 -mask /derivatives/mri/gm_mask/group_gm_mask.nii -prefix /clust_size_arouse

bi-sided thresholding

Grid: 65x77x65 3.00x3.00x3.00 mm^3 (34639 voxels in mask)

CLUSTER SIZE THRESHOLD(pthr,alpha) in Voxels

-NN 1 | alpha = Prob(Cluster >= given size)

pthr | .05000

------ | ------

0.001000 3.6

We are concerned that a cluster size of 4 is too small. Do you have any suggestions?

Thank you,


Hi Maegan,

There are a few aspect to ponder here.

Maybe the first thing to do is to rerun 3dFWHMx after removing any existing “3dFWHMx.1D” text files. There is an error message about failing to overwrite, so it is possible the values in that file are old and inappropriate.

Either way, those blur sizes look pretty small. What blur was applied in the preprocessing of subject data, and was used for that?

Maybe we can ponder other aspects after resolving these 2 questions.

  • rick

Thank you for your response. We used fMRIPrep for preprocessing and spatial normalization to the MNI 152 atlas, and used fmriprep’s motion parameter outputs to complete the preprocessing with AFNI. We did not use However, we used 8 mm FWHM spatial smoothing with the following linux script:

echo -------------------------------------------------------------------------------
echo spatial smoothing
echo -------------------------------------------------------------------------------
rm sub-${subj}_task-${task}${scan}.smooth.resid+tlrc*
3dBlurToFWHM -input sub-${subj}_task-${task}${scan}.motion.resid+tlrc
-prefix sub-${subj}_task-${task}${scan}.smooth.resid
-FWHM ${fwhm}

Although we haven’t made the code public for this project yet, we used this same code:

Thank you!


One possibility is that a lot of data variability was not accounted for in the model; thus, the high spatial correlation could lead to a small cluster size threshold. Are you trying to assess the contrast between two conditions? If possible, try 3dttest++ with either ‘-Clustsim’ or ‘-ETAC’, and see if the results are more reasonable.

Another option is to adopt a different reporting approach:,166126,166126#msg-166126