Permutations test with 3dMEMA

Good morning, I’ve done a subject-level analysis with 3dREMLfit using an amplitude-modulated stimulus. Then I used 3dMEMA to perform mixed-effects group analysis. I would like to correct for family-wise error using permutation tests instead of cluster-size based methods such as 3dClustSym. I’ve checked program ( but for what I understood it works by permuting multiple conditions across subjects, while in my case there are no conditions, the regressor of interest is modulated in amplitude (by CO2 levels). I think that in my case what should be permuted are fMRI time series or the stimulus time series. Is there any way to perform such kind of permutation tests in AFNI?

For the output of 3dMEMA, you can use 3dClustSim to obtain the minimum cluster size at the whole brain level in controlling for family-wise error. If you insist on using permutation testing, you would have to go through 3dttest++ with option -Clustsim or -ETAC (and abandon the 3dMEMA approach that accounts for the cross-subject heterogeneity of within-subject reliability).

Good morning,
I apologize for misunderstanding, I probably should have better explained my situation:
I am analyzing fMRI data with GLM and I’m trying to model neural activity related to CO2 levels during voluntary breath hold (repetitions of 30s free breathing and 30 s breath hold). The problem is that I have to test a huge number of models and decide which one is the best. Model selection is made at subject level, voxel-by-voxel, and by considering whether R2adjusted or BIC.
This model selection approach resulted to be very consistent across subjects, and selected models are always grouped into clusters of neighbor voxels. Then, at group level, I’ve chosen for each voxel the inter-subject mode, i.e., the model being selected at that voxel for the greater number of subjects.
Now, being my final result a collection of results from per-voxel selected models, I need a per-voxel correction technique for multiple comparison, and this is why I can’t use 3dClustSim. There is no “base condition”, I only have a design matrix composed of some time series of interest that describes PETCO2 fluctuations, and some nuisance regressors. This is why I can’t use Is then any way in AFNI to perform group analysis by permuting many times somehow the regressors of interest?

I need a per-voxel correction technique for multiple comparison

Sorry I have trouble understanding what you mean by “multiple comparison” in this context: are you running one or many models at the group level with 3dMEMA? Could you share a copy of the 3dMEMA (without the input file part)?

If I understand correctly what you’re trying to do, then the permutation test plug-in is what you want. It is accessible from the plug-ins menu within AFNI; it is not a separate program. The reference is

Matthew Belmonte