<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div>Dear Marlies,</div>
<div><br class="">
</div>
<div>I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective.</div>
<div><br class="">
</div>
<div>1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t
like the name <i class="">inter</i>subjcorr, because the correlation is <i class="">
over</i> subjects and not between (=inter).</div>
<div>2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately.
The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable.</div>
<div>3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries,
2007).</div>
<div><br class="">
</div>
<div>best,</div>
<div>Eric </div>
<div><br class="">
</div>
<div><br class="">
<blockquote type="cite" class=""><br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">From:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">Marlies
Vissers <<a href="mailto:marliesvissers@gmail.com" style="color: purple; text-decoration: underline;" class="">marliesvissers@gmail.com</a>><br class="">
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Re:
[FieldTrip] Effect of cfg.minnbchan</b><br class="">
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Date:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">4
Aug 2015 16:38:57 CEST<br class="">
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">To:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">FieldTrip
discussion list <<a href="mailto:fieldtrip@science.ru.nl" style="color: purple; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>><br class="">
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); margin: 0px;" class="">
<span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Reply-To:<span class="Apple-converted-space"> </span></b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">FieldTrip
discussion list <<a href="mailto:fieldtrip@science.ru.nl" style="color: purple; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>><br class="">
</span></div>
<br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<div dir="ltr" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Dear Jörn,</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span lang="NL" class=""> </span></p>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot.<span class="Apple-converted-space"> </span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel
order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label.</span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters.</span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2.</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span lang="NL" class=""> </span></p>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’
to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error<span class="Apple-converted-space"> </span><i class="">‘Undefined
function 'channelconnectivity' for input arguments of type 'struct'’</i>.<span class="Apple-converted-space"> </span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just
run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole.</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span lang="NL" class=""> </span></p>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity
if I’m correct)?<span class="Apple-converted-space"> </span></span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span lang="NL" class=""> </span></p>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Thanks in advance!</span></div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;">
<span lang="NL" class=""> </span></p>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Best,</span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class="">Marlies</span></div>
</div>
<div class="gmail_extra" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
<br class="">
<div class="gmail_quote">On 3 August 2015 at 09:37, Jörn M. Horschig<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:jorn@artinis.com" target="_blank" style="color: purple; text-decoration: underline;" class="">jorn@artinis.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class="">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
<div lang="EN-US" link="blue" vlink="purple" class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Dear Marlies,<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise.
The code is documented as follows:<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> % For every (time,frequency)-element, it is calculated how many significant<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> % neighbours .this channel has If a significant channel has less than minnbchan<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""> % significant neighbours, then this channel is removed from onoff.<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined
as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do.<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Best,<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class="">Jörn<u class=""></u><u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(98, 98, 100);" class="">--<u class=""></u><u class=""></u></span></b></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(37, 90, 158);" class=""><u class=""></u> <u class=""></u></span></b></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(37, 90, 158);" class="">Jörn M. Horschig, PhD</span></b><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(98, 98, 100);" class="">, Software Engineer</span><b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif;" class=""><u class=""></u><u class=""></u></span></b></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<a href="http://www.artinis.com/" target="_blank" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(98, 98, 100);" class="">Artinis Medical Systems</span></a><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(98, 98, 100);" class="">
| <span class="Apple-converted-space"> </span><a href="tel:%2B31%20481%20350%20980" value="+31481350980" target="_blank" style="color: purple; text-decoration: underline;" class="">+31 481 350 980</a></span><b class=""><span style="font-size: 9pt; font-family: Verdana, sans-serif; color: rgb(37, 90, 158);" class=""><u class=""></u><u class=""></u></span></b></div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);" class=""><u class=""></u> <u class=""></u></span></div>
<div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0in 0in 0in 4pt;" class="">
<div class="">
<div style="border-style: solid none none; border-top-color: rgb(225, 225, 225); border-top-width: 1pt; padding: 3pt 0in 0in;" class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<b class=""><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class="">From:</span></b><span style="font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="Apple-converted-space"> </span><a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank" style="color: purple; text-decoration: underline;" class="">fieldtrip-bounces@science.ru.nl</a><span class="Apple-converted-space"> </span>[mailto:<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank" style="color: purple; text-decoration: underline;" class="">fieldtrip-bounces@science.ru.nl</a>]<span class="Apple-converted-space"> </span><b class="">On
Behalf Of<span class="Apple-converted-space"> </span></b>Marlies Vissers<br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, July 31, 2015 3:27 PM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>fieldtrip, donders <<a href="mailto:fieldtrip@donders.ru.nl" target="_blank" style="color: purple; text-decoration: underline;" class="">fieldtrip@donders.ru.nl</a>><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>[FieldTrip] Effect of cfg.minnbchan<u class=""></u><u class=""></u></span></div>
</div>
</div>
<div class="">
<div class="h5">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
Dear Fieldtrippers.<span class="Apple-converted-space"> </span><u class=""></u><u class=""></u></div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
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.<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
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. <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
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?<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
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.<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
The code I used to run this analysis is pasted below.<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
Thanks in advance!<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
Best,<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
Marlies<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: gray;" class="">Marlies Vissers </span><u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: gray;" class="">PhD student </span><u class=""></u><u class=""></u></div>
</div>
<div class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""><u class=""></u> <u class=""></u></span></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span class=""><span style="font-size: 10pt; font-family: Tahoma, sans-serif; color: gray;" class="">University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory</span></span><span style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""><u class=""></u><u class=""></u></span></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" style="font-size: 10pt; font-family: Tahoma, sans-serif; color: gray;" class="">Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 |<span class="Apple-converted-space"> </span></span><a href="mailto:M.E.Vissers@uva.nl" target="_blank" style="color: purple; text-decoration: underline;" class=""><span lang="NL" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class="">M.E.Vissers@uva.nl</span></a><span lang="NL" style="font-size: 10pt; font-family: Tahoma, sans-serif;" class=""><u class=""></u><u class=""></u></span></div>
</div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<span lang="NL" class=""><u class=""></u> <u class=""></u></span></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
---<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Import the electrode labels from an EEGlab set <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
elec = ft_read_sens('template_64.set','fileformat','eeglab_set');<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Create matrix with TF data<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
freqData.freq = frex; % Frequenies of TF matrix<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
freqData.dimord = 'subj_chan_freq_time';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
freqData.label = elec.label;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Create matrix with behavioral data, make sure the sizes match<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
behav.freq = frex; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
behav.time = tx(TF_idx(1):TF_idx(2))./1000; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
behav.label = elec.label;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Set configuration for perm test<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Create cfg and insert parameters<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg = [];<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.latency = [0 1.250];<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.frequency = [2 30];<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.channel ='all';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.method = 'montecarlo';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.statistic = 'ft_statfun_intersubcorr';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.type = ft_getopt(cfg, 'type', 'Spearman');<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.correctm = 'cluster';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.clusteralpha = 0.05; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.clusterstatistic = 'maxsum';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.minnbchan = 2;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.tail = 0;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.clustertail = 0;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.alpha = 0.025;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.numrandomization = 1000; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat'];<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay'];<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg_neighb.method = 'template';<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData);<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Create design mat<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
subj = 31;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
design = zeros(2,2*subj);<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
for i = 1:subj<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
design(2,i) = i;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
end<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
for i = 1:subj<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
design(2,subj+i) = i;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
end<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
design(1,1:subj) = 1;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
design(1,subj+1:2*subj) = 2;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.design = design;<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.ivar = 1; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
cfg.uvar = 2; <u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
% Run stats<u class=""></u><u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
[stat] = ft_freqstatistics(cfg,freqData,behav);<u class=""></u><u class=""></u></div>
</div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif;" class="">
<u class=""></u> <u class=""></u></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" style="color: purple; text-decoration: underline;" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" style="color: purple; text-decoration: underline;" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
</blockquote>
</div>
<br class="">
</div>
<br style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class="">
</blockquote>
</div>
<br class="">
</body>
</html>