• Using 3dClustSim with SPM

    I've been working on an fMRI dataset with 80+ subjects. For second-level thresholding, I've started using AFNI's 3dClustSim to estimate the appropriate cluster extent threshold given a particular height threshold (e.g. p < .005). The best (i.e. least likely to inflate Type I errors) method requires specific smoothness estimates from the first-level analysis. The basic workflow is: Write residuals from model estimation Estimate smoothness from the residuals Average smoothness estimates across participants Use average estimates to condition 3dClustSim when determining thresholds Step 1. Write residuals The first step is the have SPM write out the residuals images during model estimation. There are two relatively straightforward was to accomplish this: If…