<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Chetan,<br>
<br>
We noticed this bug a short time ago, the don't-cluster-over-channels
option is not catched correctly at the moment. <br>
For now, you should be safe if you just change the piece of code you
quoted to (so, just removing the rest):<br>
<div> <br>
<i>channeighbstructmat = makechanneighbstructmat(cfg);</i></div>
<div><i> issource = 0;</i><br>
<br>
</div>
This should produce the correct output in your case, and the clustering
should work as intended.<br>
<br>
Kind regards,<br>
Roemer van der Meij<br>
<br>
<br>
On 2/27/2010 8:15 AM, Chetan Sharma wrote:
<blockquote
cite="mid:e3488e601002262315u58f37db8gddb02355074ec036@mail.gmail.com"
type="cite">Hello everyone,
<div><br>
</div>
<div>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:</div>
<div><br>
</div>
<div>
<div>if isfield(cfg, 'neighbours') && ~isempty(cfg.neighbours)</div>
<div> channeighbstructmat = makechanneighbstructmat(cfg);</div>
<div> issource = 0;</div>
<div>else</div>
<div> issource = 1;</div>
<div> % cfg contains dim and inside that are needed for reshaping
the data to a volume, and inside should behave as a index vector</div>
<div> cfg = fixinside(cfg, 'index');</div>
<div>end</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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?</div>
<div><br>
</div>
<div>thanks and regards,</div>
<div>-chetan</div>
</div>
<p>----------------------------------</p>
<p>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.</p>
<p> <a class="moz-txt-link-freetext" href="http://listserv.surfnet.nl/archives/fieldtrip.html">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p>
<p> <a class="moz-txt-link-freetext" href="http://www.ru.nl/fcdonders/fieldtrip/">http://www.ru.nl/fcdonders/fieldtrip/</a></p>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
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
The Netherlands
Tel: +31(0)24 3612631
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:r.vandermeij@donders.ru.nl">r.vandermeij@donders.ru.nl</a></pre>
</body>
</html>
<p>----------------------------------</p>
<p>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.</p>
<p> http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p> http://www.ru.nl/fcdonders/fieldtrip/</p>