Hi Aaron,
I am trying to do a conjunction analysis as following.
1) run 3 separate one-sample t-tests in SPM;
2) use GLM_Flex to run a single model for all 3 tasks.
Using each way, one can get 3 group activation maps (one for each condition), then threshold and binarize them and finally overlap with Imcalc (i1.*i2.*i3).
If I understand it correctly, the second way (using GLM_Flex) is the preferred one, as it accounts for the within-subject variability and allows to build mixed-effect models.
I tried to do this analysis in Fast4 (version included in MRtools_2018-03-17.zip), but have troubles with posthoc contrasts in mixed-effect model. My script is the following:
Scans = dir_wfp('/path_to_data/*.nii');
[a, b, c] = fileparts(lower(Scans{ii}));
tmp = regexp(b,'_','split');
dat.fn{ii,1} = Scans{ii};
dat.Condition{ii,1} = tmp{6};
I.Model = 'Condition + random(SS|Condition)';
I.OutputDir = '/path_to_rand_model';
I.PostHocs = {'Condition$cond1' 'cond1';
'Condition$cond2' 'cond2';
'Condition$cond3' 'cond3'};
This produces an error:
Index exceeds matrix dimensions.
Error in GLM_Flex_Fast4 (line 866)
fileNames{jj} = regexprep(fileNames{jj},':','_x_');
When I set I.DoOnlyAll = 0, the script runs without errors, but the resulting files with contrasts are empty (NaNs only).
However, when I try to run a fixed-effect model I.Model = 'Condition' with I.DoOnlyAll = 1, it works fine and produces the results rather similar to those I get with separate t-tests in SPM. But in this model the within-subject variability is not accounted for.
I would be very grateful if you could help with setting the correct contrasts for mixed-effect model, or point me to what I am doing wrong.
Thank you!
Best wishes
Olga