<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Gill Sans MT";
        panose-1:2 11 5 2 2 1 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:998725934;
        mso-list-template-ids:-476051920;}
@list l1
        {mso-list-id:2090690193;
        mso-list-type:hybrid;
        mso-list-template-ids:-1303758734 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Dear Lene,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">I would like to run a cluster-based permutation test on fMRI data. I organized my data as one would do running ft_timelockstatistics on EEG data.
 The only difference is that I provide a neighbours structure referencing a three-dimensional layout. When running ft_timelockstatistics, I get an error in the findcluster function (line 56) which seems to check whether the layout is two-dimensional (which
 it is not).<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">Does anyone know if rewriting the findcluster function will suffice to successfully run a cluster test or if there will be more errors in other functions?
 Has anyone else found a good workaround for this problem?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal">There is a lot to be said in response to your question. Because several other people have asked me a similar question, I will take this opportunity to inform the community about some recent developments.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3">Procedurally, you should follow the approach suggested by Jan-Matthijs and Eelke: organize your data as sourcedata and run ft_sourcestatistics. However, this does not automatically
 produce a correct nonparametric test. <o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3">There are important differences between electrophysiological and event-related fMRI data, and these differences have consequences for (1) the null hypothesis under which the false
 alarm rate is controlled, (2) the “generality of inference” (which roughly pertains to whether you are performing a fixed or a random effects test), and (3) the sensitivity of the nonparametric test. These differences have consequences for how one should set
 up one’s experiment and construct the reference distribution. The reference distribution that is constructed by Fieldtrip (a permutation distribution) is not always the correct one. The theory behind nonparametric tests for fMRI data can be found in a preprint
 on BioaRXiv: <span style="font-family:"Gill Sans MT",sans-serif;color:#333333;background:white">
<a href="https://doi.org/10.1101/685560">https://doi.org/10.1101/685560</a></span>. This paper focuses on event-related fMRI designs; for blocked fMRI designs, the same theory as for electrophysiological data can be used.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3">The sensitivity of the cluster-based randomization test for fMRI data depends on the connectivity (6-, 18-, or 26-connected) that is used for determining the clusters. In our simulations,
 6-connectivity was clearly the most sensitive way of constructing clusters.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l1 level1 lfo3">The sensitivity of the cluster-based randomization test for fMRI data strongly depends on the cluster-defining threshold (CDT). This is because fMRI data can exhibit both a strong
 effect in a small part of the brain or weak effect over a large part of the brain. For the first effect type, a high CDT is more sensitive, and for the second effect type, a low CDT is more sensitive. (For electrophysiological data, one almost always uses
 the default CDT=0.05, and this can be defended by the fact that, as a result of volume conduction, strong effects at the source level are also widespread.) We have found a way to combine different CDTs in a single test statistic, which broadens the sensitivity
 spectrum of the cluster-based randomization test. We reported on this at OHBM2019 in Rome (Geerligs & Maris), and we are finalizing the manuscript now.
<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In sum, we expect to deliver a product for the fMRI community very soon.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best,<o:p></o:p></p>
<p class="MsoNormal">Eric Maris<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">Any help is greatly appreciated.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">Best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">Lene<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>