[FieldTrip] Problems with permutation based cluster analysis (ft_freqstatistics)

Alea Skwara acskwara at ucdavis.edu
Wed Oct 18 23:05:45 CEST 2017

Hi All,

I have been conducting a permutation based cluster analysis using the
method = 'montecarlo' correctm= 'cluster' options in ft_freqstatistics to
examine longitudinal changes in spectral power. Everything runs just fine
and it identifies clusters successfully.

However, when I examine the results of the analysis, some of the stats
strike me as strange. Electrodes that have the highest F values (I am
comparing across 3 timepoints) do not test as significant, while electrodes
with lower F values do. At first I thought this was because I had a single
"hot" electrode that was not part of a larger cluster, but looking more
closely at the stats, it appears that this is not the case.

I have tried double-checking my neighbor definition method and electrode
locations to assure that it is not an issue with neighbors being
incorrectly registered. I have also tried adjusting the minimum cluster
size using the minnbchan option to ensure it was not an issue of a cluster
not reaching the minimum extent. Neither of these options seem to have any
impact on the result.

At this point I'm at a loss. Is there something I'm misunderstanding about
the algorithm?

Code below and plot below, channel-by-channel stats attached.


One funky thing to note about this code is that I am inputting average
values into the analysis (averaged across time as participants have
slightly differing lengths of data, and within bands as I am running this
analysis on IAF-based bands, thus "7" is a dummy code for "mean beta band
power", not 7 Hz)

 %Set up the analysis cfg for 3 conditions (pre- to mid- to post-)
cfg = [];
cfg.channel          = {'all'};
cfg.latency          = 'all';
cfg.frequency        = [7 7]; %frequency band indicator
cfg.avgoverfreq      = 'no'; %working on bands not frequencies, so nothing
to average
cfg.method           = 'montecarlo';
cfg.statistic        = 'depsamplesFmultivariate'; %three time points
cfg.correctm         = 'cluster';
cfg.clusteralpha     = 0.1;  %change to .1 because we're computing over
averaged bands and time (losing power)
cfg.clusterstatistic = 'maxsum';
cfg.minnbchan        = 2;
cfg.tail             = 1;  %this has to be 1 for depsamplesF, 0 otherwise
cfg.clustertail      = 1;  %this has to be 1 for depsamplesF, 0 otherwise
cfg.alpha            = 0.05; %this has to be 0.05 for depsamplesF, 0.025
cfg.numrandomization = 10000; %to get a min p-value of 0.0001 to account
for 500 tests and correction by Bonferroni method.
%specify which electrodes can form clusters
cfg_neighb.method = 'distance';
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, r1t1r_struct);
%cfg.neighbours = cfgManish.neighbours;
%cfg = getNeighbours(cfg); % using fixed neighbours
cfg.layout = layout';

% Set up the design matrixfor 3 conditions
subj = 27; %will differ based on condition

design = zeros(2,3*subj);
for isub = 1:1:subj
    design(1,isub) = isub;
    design(1,subj+isub) = isub;
    design(1,2*subj+isub) = isub;
design(2,1:subj) = 1;
design(2,subj+1:2*subj) = 2;
design(2,2*subj+1:3*subj) = 3;

cfg.design   = design;
cfg.uvar     = 1;
cfg.ivar     = 2;

% Run the analysis
[r1r_stat_beta] = ft_freqstatistics(cfg, r1t1r_struct, r1t2r_struct,

%Plot the results
cfg1 = [];
cfg1.alpha  = 0.1;
cfg1.parameter = 'stat';
%cfg1.zlim   = [0 18.1];
cfg1.layout = layout';
cfg1.marker = 'o';
cfg1.subplotsize = [1 1];
cfg1.saveaspng = 'r1r_betacluster';

ft_clusterplot(cfg1, r1r_stat_beta);

***Note non-significant hot spot over left parietal***

[image: Inline image 2]

Alea C. Skwara
Graduate Student | Saron Lab

Center for Mind and Brain | University of California, Davis
267 Cousteau Place | Davis CA 95616
Cell: (828) 273-8595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20171018/e4d1f4f3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: r1r_betacluster_fig1.png
Type: image/png
Size: 49573 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20171018/e4d1f4f3/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clusterstats_beta.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 11196 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20171018/e4d1f4f3/attachment-0001.xlsx>

More information about the fieldtrip mailing list