<div dir="ltr">Hello Jose,<br><br>I haven't looked closely at your code, but it sounds like this is working exactly as intended. A significant F-test doesn't mean that there must be significant differences between all pairs of groups; hypothetically, an F-test comparing 100 groups could be significant even if only 99 and 100 are significantly different from each other. This isn't something specific to the cluster-based permutation test, this is just how F-tests work in general.<br><br>As for getting different cluster extents with the 3-level F-test vs. the pairwise t-test, this is also normal; you're comparing different things so it's natural that the test statistics will come out slightly different.<br><br>Best,<br>Steve<br><br><br>---<br>Stephen Politzer-Ahles<br>The Hong Kong Polytechnic University<br>Department of Chinese and Bilingual Studies<br><a href="http://www.mypolyuweb.hk/~sjpolit/">http://www.mypolyuweb.hk/~sjpolit/</a><br> <br>><br>><br>> Message: 1<br>> Date: Tue, 11 Apr 2017 12:08:44 +0200<br>> From: Jos? Antonio Uriguen Garaizabal <<a href="mailto:jose.uriguen@deusto.es">jose.uriguen@deusto.es</a>><br>> To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>><br>> Subject: [FieldTrip] Need help with cluster-based permutation test<br>>         with 3  groups of subjects<br>> Message-ID:<br>>         <<a href="mailto:CAMMf7X15byC6p3gqaie6wEuKekV2krZ0%2B%2BkeLLUPZ3pn2h-PAA@mail.gmail.com">CAMMf7X15byC6p3gqaie6wEuKekV2krZ0++keLLUPZ3pn2h-PAA@mail.gmail.com</a>><br>> Content-Type: text/plain; charset="utf-8"<br>><br>> Dear all<br>><br>><br>> My name is Toni and I am working on EEG signal processing at University of<br>> Deusto, Bilbao, Spain. More specifically, right now trying to<br>> apply cluster-based permutation testing to determine whether there exist<br>> differences among 3 groups of subjects.<br>><br>><br>> So, for my testing, subject groups are E, EN and N, the 2 former being<br>> different types of patients and the latter being a control group. I am<br>> forming clusters based on proximity (in space) and each subject is<br>> characterized by a matrix of values that vary in 2D (per channel and<br>> another variable related but not equal to frequency).<br>><br>> By means of a T-statistic (indepsamplesT) I can find differences in between<br>> E and EN, but I find no clusters/differences in between E and N or EN and<br>> N, even though hypothetically (I think) they should exist. By means of an<br>> F-statistic (indepsamplesF) I can find differences among the 3 groups at<br>> the same time, then also between E and EN and no differences between E and<br>> N or EN and N...<br>><br>> Am I missing something? I do not understand why the might exist a<br>> significant cluster when comparing all 3 groups that does not exist in the<br>> 1vs1 comparisons, even though the cluster is not the same I obtain when I<br>> compare E vs EN...<br>><br>><br>> For additional information, I attach how I run the test:<br>><br>> cfg.method           = 'distance';<br>> cfg.neighbourdist    = 1;<br>> cfg.elec             = ft_datatype_sens(subjEN{1}.elec);<br>> neighbours           = ft_prepare_neighbours(cfg);<br>><br>> cfg                  = [];<br>> cfg.channel          = {'EEG'};<br>> cfg.latency          = 'all';<br>> cfg.method           = 'montecarlo';<br>> cfg.statistic        = 'indepsamplesT';<br>> cfg.correctm         = 'cluster';<br>> cfg.clusteralpha     = 0.05;<br>> cfg.clusterstatistic = 'maxsum';<br>><br>> cfg.minnbchan        = 2;<br>><br>> cfg.neighbours       = neighbours;  % same as defined for the<br>> between-trials experiment<br>> cfg.tail             = 0;<br>> cfg.clustertail      = 0;<br>> cfg.alpha            = 0.025;<br>> cfg.numrandomization = 5000;<br>><br>> nsubj                           = size(subjE,2)+size(subjEN,2);<br>> design                          = zeros(2,nsubj);<br>> design(1,:)                     = [1:nsubj/2 1:nsubj/2];<br>> design(2,1:size(subjE,2))       = 1;<br>> design(2,size(subjE,2)+1:nsubj) = 2;<br>><br>> cfg.design = design;<br>> cfg.ivar   = 2;<br>><br>> [stat] = ft_timelockstatistics(cfg, subjEN{:}, subjE{:});<br>><br>><br>> When I compare the 3 groups<br>><br>> cfg.method           = 'distance';<br>> cfg.neighbourdist    = 1;<br>> cfg.elec             = ft_datatype_sens(subjEN{1}.elec);<br>> neighbours           = ft_prepare_neighbours(cfg);<br>><br>> cfg                  = [];<br>> cfg.channel          = {'EEG'};<br>> cfg.latency          = 'all';<br>> cfg.method           = 'montecarlo';<br>> cfg.statistic        = 'indepsamplesF'; %F-statistic<br>> cfg.correctm         = 'cluster';<br>> cfg.clusteralpha     = 0.05;<br>> cfg.clusterstatistic = 'maxsum';<br>><br>> cfg.minnbchan        = 2;<br>><br>> cfg.neighbours       = neighbours;  % same as defined for the<br>> between-trials experiment<br>> cfg.tail             = 1; %One sided<br>> cfg.clustertail      = 1;<br>> cfg.alpha            = 0.025;<br>> cfg.numrandomization = 5000;<br>><br>> nsubj1                          = size(subjE,2);<br>> nsubj2                          = size(subjEN,2);<br>> nsubj3                          = size(subjN,2);<br>> nsubj                           = nsubj1+nsubj2+nsubj3;<br>><br>> design                           = zeros(2,nsubj);<br>> design(1,:)                      = [1:nsubj1 1:nsubj2 1:nsubj3];<br>> design(2,1:nsubj1)               = 1;<br>> design(2,nsubj1+1:nsubj1+nsubj2) = 2;<br>> design(2,nsubj1+nsubj2+1:nsubj)  = 3;<br>><br>> cfg.design = design;<br>> cfg.ivar   = 2; %2nd row is independent var<br>><br>> [stat] = ft_timelockstatistics(cfg, subjE{:}, subjEN{:}, subjN{:});<br>><br>><br>> Then, subjE, subjN and subjEN are like this:<br>><br>> Eall = subjE{:}<br>><br>> Eall =<br>><br>>   struct with fields:<br>><br>>       label: {1?18 cell}<br>>     fsample: 200<br>>        elec: [1?1 struct]<br>>       trial: {[18?115 double]}<br>>        time: {[1?115 double]}<br>>         cfg: [1?1 struct]<br>><br>><br>> Thanks in advance<br>><br>> --<br>> *Jose Antonio Urig?en*<br>> PostDoc at Deustotech-LIFE (eVIDA Research Group)<br>> [image: Deusto] <<a href="http://www.deusto.es/">http://www.deusto.es/</a>><br>> Universidad de Deusto / Deustuko Unibertsitatea / University of Deusto<br>> Facultad de Ingenier?a, 4? Planta<br>> Avda. Universidades 24. 48007 Bilbao<br>> Tel. +34 94 413 90 00 / Mov. +34 656 711 643<br>> Ext. 2980<br>> <a href="mailto:jose.uriguen@deusto.es">jose.uriguen@deusto.es</a> <<a href="mailto:sanchez.alain@deusto.es">sanchez.alain@deusto.es</a>><br>> Web: <a href="http://evida.deusto.es">evida.deusto.es</a><br>> *<a href="http://www.deusto.es">www.deusto.es</a> <<a href="http://www.deusto.es/">http://www.deusto.es/</a>>*<br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170411/7a169976/attachment-0001.html">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170411/7a169976/attachment-0001.html</a>><br>><br></div>