[FieldTrip] Effect of cfg.minnbchan

Marlies Vissers marliesvissers at gmail.com
Fri Jul 31 15:27:27 CEST 2015

Dear Fieldtrippers.

I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used.

I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2.

My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2?

I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error.

The code I used to run this analysis is pasted below.

Thanks in advance!


Marlies Vissers
PhD student

University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory
Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl<mailto:M.E.Vissers at uva.nl>


% Import the electrode labels from an EEGlab set
elec = ft_read_sens('template_64.set','fileformat','eeglab_set');

% Create matrix with TF data
freqData.freq = frex;                                        % Frequenies of TF matrix
freqData.time = tx(TF_idx(1):TF_idx(2))./1000;  % Time samples in TF matrix
freqData.dimord = 'subj_chan_freq_time';
freqData.label = elec.label;
freqData.powspctrm = tempTF;                       % tempTF is matrix with subj*channels*freq*time

% Create matrix with behavioral data, make sure the sizes match
behav.freq = frex;
behav.time =  tx(TF_idx(1):TF_idx(2))./1000;
behav.dimord = 'subj_chan_freq_time';              % Trick FT: there is just behavioral data in this matrix
behav.label = elec.label;
behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array

% Set configuration for perm test
% Create cfg and insert parameters
cfg = [];
cfg.latency                = [0 1.250];
cfg.frequency            = [2 30];
cfg.channel               ='all';
cfg.method               = 'montecarlo';
cfg.statistic              = 'ft_statfun_intersubcorr';
cfg.type                   = ft_getopt(cfg, 'type', 'Spearman');
cfg.correctm            = 'cluster';
cfg.clusteralpha       = 0.05;
cfg.clusterstatistic    = 'maxsum';
cfg.minnbchan         = 2;
cfg.tail                    = 0;
cfg.clustertail           = 0;
cfg.alpha                 = 0.025;
cfg.numrandomization = 1000;

% prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap
cfg.template              =  [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat'];
cfg.layout                  =  [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay'];
cfg_neighb.method    =   'template';
cfg.neighbours          =   ft_prepare_neighbours(cfg_neighb,freqData);

% Create design mat
subj = 31;
design = zeros(2,2*subj);
for i = 1:subj
  design(2,i) = i;
for i = 1:subj
  design(2,subj+i) = i;
design(1,1:subj) = 1;
design(1,subj+1:2*subj) = 2;
cfg.design       = design;
cfg.ivar = 1;
cfg.uvar = 2;

% Run stats
[stat] = ft_freqstatistics(cfg,freqData,behav);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150731/f7479a0c/attachment-0001.html>

More information about the fieldtrip mailing list