<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="ltr">Dear Fieldtrippers.
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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. <br>
</div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>The code I used to run this analysis is pasted below.</div>
<div><br>
</div>
<div>Thanks in advance!</div>
<div><br>
</div>
<div>Best,</div>
<div>Marlies</div>
<div><span style="color:rgb(128,128,128);font-family:Tahoma;font-size:13px"><br>
</span></div>
<div><span style="color:rgb(128,128,128);font-family:Tahoma;font-size:13px">Marlies Vissers </span></div>
<div><span style="color:rgb(128,128,128);font-family:Tahoma;font-size:13px">PhD student </span><br>
</div>
<div>
<div style="color:rgb(0,0,0);font-family:Tahoma;font-size:13px"><span class="Apple-style-span" style="color:rgb(128,128,128)"><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Tahoma;font-size:13px"><span class="Apple-style-span" style="color:rgb(128,128,128)">University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory<br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Tahoma;font-size:13px"><font class="Apple-style-span" color="#808080">Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 |
<a href="mailto:M.E.Vissers@uva.nl">M.E.Vissers@uva.nl</a></font></div>
</div>
<div><font class="Apple-style-span" color="#808080"><br>
</font></div>
<div>---</div>
<div><br>
</div>
<div>
<div>% Import the electrode labels from an EEGlab set <br>
</div>
<div>elec = ft_read_sens('template_64.set','fileformat','eeglab_set');</div>
<div><br>
</div>
<div>% Create matrix with TF data</div>
<div>freqData.freq = frex; % Frequenies of TF matrix</div>
<div>freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix</div>
<div>freqData.dimord = 'subj_chan_freq_time';</div>
<div>freqData.label = elec.label;</div>
<div>freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time</div>
<div><br>
</div>
<div>% Create matrix with behavioral data, make sure the sizes match</div>
<div>behav.freq = frex; </div>
<div>behav.time = tx(TF_idx(1):TF_idx(2))./1000; </div>
<div>behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix</div>
<div>behav.label = elec.label;</div>
<div>behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array</div>
<div><br>
</div>
<div>% Set configuration for perm test</div>
<div>% Create cfg and insert parameters</div>
<div>cfg = [];</div>
<div>cfg.latency = [0 1.250];</div>
<div>cfg.frequency = [2 30];</div>
<div>cfg.channel ='all';</div>
<div>cfg.method = 'montecarlo';</div>
<div>cfg.statistic = 'ft_statfun_intersubcorr';</div>
<div>cfg.type = ft_getopt(cfg, 'type', 'Spearman');</div>
<div>cfg.correctm = 'cluster';</div>
<div>cfg.clusteralpha = 0.05; </div>
<div>cfg.clusterstatistic = 'maxsum';</div>
<div>cfg.minnbchan = 2;</div>
<div>cfg.tail = 0;</div>
<div>cfg.clustertail = 0;</div>
<div>cfg.alpha = 0.025;</div>
<div>cfg.numrandomization = 1000; </div>
<div><br>
</div>
<div>% prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap</div>
<div>cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat'];</div>
<div>cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay'];</div>
<div>cfg_neighb.method = 'template';</div>
<div>cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData);</div>
<div><br>
</div>
<div>% Create design mat</div>
<div>subj = 31;</div>
<div>design = zeros(2,2*subj);</div>
<div>for i = 1:subj</div>
<div> design(2,i) = i;</div>
<div>end</div>
<div>for i = 1:subj</div>
<div> design(2,subj+i) = i;</div>
<div>end</div>
<div>design(1,1:subj) = 1;</div>
<div>design(1,subj+1:2*subj) = 2;</div>
<div>cfg.design = design;</div>
<div>cfg.ivar = 1; </div>
<div>cfg.uvar = 2; </div>
<div><br>
</div>
<div>% Run stats</div>
<div>[stat] = ft_freqstatistics(cfg,freqData,behav);</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</body>
</html>