[FieldTrip] 2x2 ANOVA at source level using cluster based permutation

philip Joadavi p.joadavi at gmail.com
Wed Mar 15 17:14:45 CET 2023


Dear all,

I would like to run ANOVA  to test the main and interaction effects on my
beamforming results. (I used DISC beamformer)
I've already looked at the FAQ on the FieldTrip website and also the
questions in the mailing list.

To check if I have done the steps correctly, I have also done the 2x2 ANOVA
using SPM and I got significant results, but without FWE/FDR correction for
multiple comparisons at the voxel level.

When I apply the steps described in the FieldTrip and also the mailing list
(for cluster-based permutation) I could not get any significant clusters.
This is surprising for me because I get always nicer results from
permutation tests than I do not get from SPM.

I think I'm doing something wrong and I would appreciate any help.

So, as far as I understood, I can not use F statistics for 2x2 ANOVA, and
therefore I used dependent sample T statistics for within-subject design as
explained by Eric in the mailing list.

here is my code :
So, I have 2 conditions A and B, each with 2 levels (I & II).
For the averages, I used ft_ grandaverage for 2 conditions/levels, and I
got a matrix of pow = [number of subjects x number of voxels] = [12x 411477]

Here is the code:

my data is arranged such that the columns are the conditions (A/B) and the
rows are the levels (I/II).



% Main effect of levels (I/II)

I  = ft_sourcegrandaverage([],GA{1,1:2});

II = ft_sourcegrandaverage([],GA{2,1:2});



% Main effect of conditions (A/B)

A = ft_sourcegrandaverage([],GA{1:2,1});

B = ft_sourcegrandaverage([],GA{1:2,2});



% Interaction effect

cfg           = [];

cfg.operation = 'subtract';

cfg.parameter = 'pow';



INA = ft_math(cfg, GA{1,1}, GA{2,1}); % I - II (A)

INB = ft_math(cfg, GA{1,2}, GA{2,2}); % I - II (B)





%% prepare the hypothesis testing

cfg                  = [];

cfg.dim              = GA{1}.dim;

cfg.method           = 'montecarlo';

cfg.correctm         = 'cluster';

cfg.spmversion       = 'spm12';

cfg.parameter        = 'pow';

cfg.numrandomization = 'all';

cfg.correcttail      = 'alpha';


cfg.statistic        = 'depsamplesT';

cfg.alpha            = 0.05/2; % two tails

cfg.clusteralpha     = 0.01;

cfg.tail             = 0; % I also tried 1 for one tail

cfg.clustertail      = cfg.tail;

cfg.uvar             = 1; % subject

cfg.ivar             = 2; % conditions

cfg.design           = [repmat(1:numel(subjects),1,2); repelem([1
2],numel(subjects))];




stat{1}   = ft_sourcestatistics(cfg,I,II); % main effect (I/II)

stat{2}   = ft_sourcestatistics(cfg,A,B);  % main effect (A/B)

stat{3}   = ft_sourcestatistics(cfg,INA,INB); % Interaction


Side note: I also tried the one-tail option, but the results were not
significant eighter.




I would appreciate any help!
Best,
Philip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230315/84f91311/attachment.htm>


More information about the fieldtrip mailing list