[FieldTrip] Antw: Re: Wrong clustering of electrodes in newer FT versions?

Gregor Volberg Gregor.Volberg at psychologie.uni-regensburg.de
Fri Nov 11 18:08:50 CET 2011


Hi Jörn, 

thanks a lot for your response. I meanwhile checked some possible reasons for
the different clusterings and I am coming closer.  
I could reproduce the described error with two different datasets (62 channel
and 29 channel EEG), on two different computers and with two different versions
of fieldtrip (2011 versions).  First of all, I checked the neighbourhood
structures. They are identical in my two analyses - same number of electrodes,
same order, same neighbours. I checked that before and after entering
neighbours into the analyses (by comparing the stat.cfg.neighbours) - they are
the same. 
I then searched through the code and found the channeighbstructmat that is
constructed during the call of "clusterstat.m". I saved these matrices during
the call of ft_freqstatistics and found that, with the same neighbourhood
structures, the channeighbstructmat looked  completely different in the old and
new version. I then changed the code of the new FT "clusterstat.m" so that it
reads in the channeighbstructmat obtained with the old FT version - then
everything works perfect. 

Thus, the problem is most likely an incorrect channeighbstructmat. I figured
out that in my case, FT calls an SPM8 function spm_bwlabeln during construction
of the channeighbstructmat, which older version do not do. However, if I
understood the code correctly, the SPM function should only be called for
source data?! Could it be that, because my data is a 4D grand-average structure
( dimord: 'subj_chan_freq_time'), FT assumes source data? 

Thanks again for your help, 
Gregor 

 


-- 
Dr. rer. nat. Gregor Volberg <gregor.volberg at psychologie.uni-regensburg.de> (
mailto:gregor.volberg at psychologie.uni-regensburg.de )
University of Regensburg
Institute for Experimental Psychology
93040 Regensburg, Germany
Tel: +49 941 943 3862 
Fax: +49 941 943 3233
http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html


>>> "Jörn M. Horschig"<jm.horschig at donders.ru.nl> 11/9/2011 4:00 PM >>>
Hi Gregor,

did you check your neighbourselection? Maybe something is going wrong there,
given that a lot in this code has changed since 2010. Could you check that
using ft_neighbourplot? This would be the most logical explanation why the
results differ. It does not really make sense that these three sensors form one
cluster, because they should not be neighbours of each other. So i would
suppose that something is going wrong there.

Best,
Jörn


On 11/3/2011 4:57 PM, Michael Wibral wrote: 


Hi Gregor,

in principle the first level statistics that determine cluster membership (and
thereby cluster shapes etc.)  can also vary from one set of permutations to the
next, esp. on the borders of a cluster (this is why it is typically said that
the localization of a cluster is not as trustworthy as its existence). Other
resaons for differences are differing number of permutations - did you set
everything the same?

This said there might well be another problem - I hope the cluster people can
have a look into it.

Best ,
Michael





Von: "Gregor Volberg" <Gregor.Volberg at psychologie.uni-regensburg.de> (
mailto:Gregor.Volberg at psychologie.uni-regensburg.de )
Gesendet: Nov 2, 2011 6:34:43 PM
An: fieldtrip at donders.ru.nl
Betreff: [FieldTrip] Wrong clustering of electrodes in newer FT versions?


Dear fieldtrip community, 


I just encountered an unexpected behavior of FT that I would like to share
with the list. It is that the cluster permutation test formed incorrect
clusters from a given set of significant electrodes in newer FT versions
(ft-20111012; I also tried with ft-20111028).  


For example, when using an old ft version (ft-20100810)  and freqstatistics I
get a negative cluster with 17 contiguous electrodes. With the newer ft
version, using the same data and the same cfg, three significant  electrodes
that are spatially contiguous to the other significant electrodes are not
included in the cluster. Also, three electrodes that are spatially seperated
and are actually part of the first cluster are grouped into a separate cluster.
 I attached a picture with the respective clusterplots where differences are
marked with red arrows. 
  
I am aware that the permutation p-value for a given cluster can be different
in two separate analyses, but the grouping of significant electrodes into
clusters should always be the same, am i right? I double-checked the
cfg.neighbours, after conversion to new 'struct' style, and they were identical
in the "old ft" and "new ft"  analysis. Also, the stat.stat field and the
stat.cfg.clustercritval were the same for both analyses. Thus, the same
neighbourhood relations and the same significant electrodes should be used for
grouping. Yet I get different results...  


I am almost sure that this is trivial, but I could not yet replicate my old
results with new FT and this makes me nervous. Has someone made a similar
experience? Or do newer versions of ft use some further information besides
cfg.neighbours for clustering, somewhere in the *cfg.previuous perhaps, that I
am not aware of? Any comments are highly welcome. 


Best regards, 
Gregor 


cfg = []; 
cfg.neighbours    = neighbours; 
cfg.minnbchan=1; 
cfg.avgoverfreq   = 'yes'; 
cfg.avgovertime   = 'yes'; 
cfg.method        = 'montecarlo'; 
cfg.correctm       = 'cluster'; 
cfg.statistic     = 'depsamplesT'; 
cfg.tail          = 0; 
cfg.alpha         = 0.05; 
cfg.clusteralpha = 0.05; 
cfg.numrandomization = 1000; 
cfg.design = [[1:14 1:14]; [zeros(1,14)+1 zeros(1,14)+2]]; 
cfg.uvar          = 1; 
cfg.ivar          = 2; 
cfg.latency       = [2.24 2.53]; 
cfg.frequency     = [17 21];% 
stat = ft_freqstatistics(cfg, DC, TC); 

--
Dr. rer. nat. Gregor Volberg <gregor.volberg at psychologie.uni-regensburg.de> (
mailto:gregor.volberg at psychologie.uni-regensburg.de ) (
mailto:gregor.volberg at psychologie.uni-regensburg.de )
University of Regensburg
Institute for Experimental Psychology
93040 Regensburg, Germany
Tel: +49 941 943 3862
Fax: +49 941 943 3233
http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html  (
http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html%0A
)

  
 



_______________________________________________    
fieldtrip mailing list  
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour 
Centre for Cognitive Neuroimaging
Radboud University Nijmegen 
Neuronal Oscillations Group

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111111/d2179411/attachment.html>


More information about the fieldtrip mailing list