clusterstats empty cfg.neighbours, cfg.neighbours example
Roemer van der Meij
r.vandermeij at DONDERS.RU.NL
Mon Mar 1 10:19:22 CET 2010
We noticed this bug a short time ago, the don't-cluster-over-channels
option is not catched correctly at the moment.
For now, you should be safe if you just change the piece of code you
quoted to (so, just removing the rest):
/channeighbstructmat = makechanneighbstructmat(cfg);/
/ issource = 0;/
This should produce the correct output in your case, and the clustering
should work as intended.
Roemer van der Meij
On 2/27/2010 8:15 AM, Chetan Sharma wrote:
> Hello everyone,
> I'm trying to run the coherence Z nonparametric test to detect
> synchrony between two channels of MEG data. Because of how restrictive
> bonferoni, FDR, and all are, we wanted to use the 'cluster' function
> for cfg.correctm. This call to statistics_montecarlo.m, which says in
> the description that to do clustering in frequency and time, as we
> want to do, we should use an empty cfg.neighbours structure. However,
> when the function calls clusterstats.m, it looks like there is a bug
> in the code. The relevant code is at line 38 in clusterstats.m, and is:
> if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours)
> channeighbstructmat = makechanneighbstructmat(cfg);
> issource = 0;
> issource = 1;
> % cfg contains dim and inside that are needed for reshaping the data
> to a volume, and inside should behave as a index vector
> cfg = fixinside(cfg, 'index');
> The issue is that the case for an empty cfg.neighbours isn't handled.
> Running the function with an empty cfg.neighbours leads to a bug when
> calculating the clusters, and makes issource=1, when it should be zero
> for freq_time data. The function runs through when I manually set
> issource=0, but I don't know if that is the intended purpose.
> Has anyone else run into this problem? Without an example of what
> cfg.neighbours should look like, it's hard to determine if we are
> doing a correct setup. Could someone either send an example of
> cfg.neighbours, or verify this bug and suggest solutions?
> thanks and regards,
> The aim of this list is to facilitate the discussion between users of
> the FieldTrip toolbox, to share experiences and to discuss new ideas
> for MEG and EEG analysis.
Roemer van der Meij MSc
Scientific Programmer& Data-Analyst
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
Tel: +31(0)24 3612631
E-mail: r.vandermeij at donders.ru.nl
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fieldtrip