<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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        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;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.E-mailStlus19
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1986815104;
        mso-list-type:hybrid;
        mso-list-template-ids:-1763126908 68026383 68026393 68026395 68026383 68026393 68026395 68026383 68026393 68026395;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0: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=HU link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>Hi Songhee,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>I am not sure I understand the problem you describe, but I can see two issues:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><ol style='margin-top:0cm' start=1 type=1><li class=MsoListParagraph style='margin-left:0cm;mso-list:l0 level1 lfo1'><span lang=EN-GB style='mso-fareast-language:EN-US'>If you average vertices and create virtual channels (i.e. the average time series within a ROI), you cannot look for clusters at vertex level anymore. You can, however, use the COG of the ROIs to create an “elec” structure with channel positions and treat your data as it would be in sensor space with your ROIs as the “sensors”. I am developing the </span><a href="https://github.com/automaticanalysis/automaticanalysis">Automatic Analysis (aa)</a> <span lang=EN-GB style='mso-fareast-language:EN-US'>pipeline</span>, which has all of these steps implemented. For code snippets, see <a href="https://github.com/tiborauer/automaticanalysis/blob/master/aa_modules/aamod_meeg_preparesourcemodel.m">aamod_meeg_preparesourcemodel.m</a> (lines 112-149) and <a href="https://github.com/tiborauer/automaticanalysis/blob/master/aa_modules/aamod_meeg_sourceatlasing.m">aamod_meeg_sourceatlasing</a>.<span lang=EN-GB style='mso-fareast-language:EN-US'><o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l0 level1 lfo1'><span lang=EN-GB style='mso-fareast-language:EN-US'>Neighbourhood in time is implicit, as Jan-Mathijs describes. However, you can filter your clusters after the stats and select only those with a temporal extent >= N, if that is what you ask for.<o:p></o:p></span></li></ol><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'>Kind regards,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-GB'>Tibor <o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-GB'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='color:#222A35;mso-fareast-language:EN-GB'>Auer, Tibor M.D. Ph.D.<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='color:#0066FF;mso-fareast-language:EN-GB'>Research Fellow<o:p></o:p></span></b></p><p class=MsoNormal><b><span style='color:#0066FF;mso-fareast-language:EN-GB'>School of Psychology, Faculty of Health and Medical Sciences</span></b><span style='color:#0066FF;mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-GB'>University of Surrey, Guildford GU2 7XH<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-GB'><a href="mailto:T.Auer@surrey.ac.uk"><span style='color:#0563C1'>T.Auer@surrey.ac.uk</span></a><u><span style='color:#0563C1'><o:p></o:p></span></u></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-GB'><a href="https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FTiborAuer&data=02%7C01%7Ct.auer%40surrey.ac.uk%7Cdb32da458c424eedef2908d7d4bd1421%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C637211780868086968&sdata=zrT5%2FnGGsar14C3WartuU99tzsfLu30Peh9fuaqrAUg%3D&reserved=0"><span style='color:#0563C1'>@TiborAuer</span></a></span><span lang=EN-GB style='mso-fareast-language:EN-GB'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> <b>On Behalf Of </b>Songhee Kim via fieldtrip<br><b>Sent:</b> Saturday, November 27, 2021 12:37 AM<br><b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br><b>Cc:</b> Songhee Kim <songhee.kim@nyu.edu><br><b>Subject:</b> Re: [FieldTrip] cluster-based permutation test in the time dimension<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>Thanks Jan-Mathijs. I have the following questions: <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>1. So minnbchan is only for the data in the sensor space, correct? <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>2. If so, is the 'cluster' method available at all for data in the source space as a means of multiple comparisons correction? <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>Basically I was wondering if I can run a cluster-based permutation t-test on the source-level data. For example, I might want to average brain activities across all the vertices within an ROI, get a timeseries, and then do a permutation t-test on it such that a cluster is formed if a t-statistic is above a certain threshold at least for, say, 5 contiguous time samples. (This is a temporal clustering test, and one might want to do a spatio-temporal clustering test where a cluster is formed if an above-threshold statistic is found for N adjacent time samples and M adjacent vertices, etc). <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>I hope I explained my question more clearly. Thanks! <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>Best,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>Songhee<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Nov 24, 2021 at 7:16 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><p class=MsoNormal>Hi Songhee, <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I don’t know whether I fully understand your question, but I think that such option does not exist. The option minnbchan only exists (and is functional) for channel level data, in order to define the minimum number of suprathreshold neighbouring channels. Across the time and frequency etc. dimension the spatial neighbourhood is implicit in the consecutive time/freq points, so each sample by definition only has 2 neighbours (one on either side).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Note that minnbchan will not work for ft_sourcestatistics, as far as I know.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Best wishes,<o:p></o:p></p></div><div><p class=MsoNormal>Jan-Mathijs<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal><br><br><o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>On 11 Nov 2021, at 01:17, Songhee Kim via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>> wrote:<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>Hi folks,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'>I wonder if a cluster-based permutation test <b>with respect to the temporal dimension</b> is implemented in Fieldtrip. I can see that there is an option to set a minimal number of channels to form a cluster (i.e., </span><span style='font-size:12.0pt;font-family:"Arial",sans-serif'>minnbchan) when running</span><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'> ft_sourcestatistics</span><span style='font-size:12.0pt;font-family:"Arial",sans-serif'>. Is there a similar option for the temporal dimension? Any help would be appreciated! </span><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Arial",sans-serif'>Best,</span><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Arial",sans-serif'>Songhee  </span><span style='font-size:12.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><p class=MsoNormal><span style='color:#444444'>-- </span><o:p></o:p></p><div><div><div><div><div><div><div><p class=MsoNormal><b><span style='font-size:9.5pt;color:#444444'>Songhee Kim, PhD</span></b><span style='font-size:9.5pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:#444444'>Postdoctoral Fellow</span><span style='font-size:9.5pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:#444444'>Department of Neurology</span><span style='font-size:9.5pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:#444444'>Medical College of Wisconsin</span><span style='font-size:9.5pt'><o:p></o:p></span></p></div></div></div></div></div></div></div></div><p class=MsoNormal>_______________________________________________<br>fieldtrip mailing list<br><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwMGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=tlK7RBNy-D_i9Enf1gYqi-z8d4dFj8ItNQJ8lOt6XjU&m=Wqztp68kBoCt6n2thC9cgh3-Tcrm200Ty2--1jqQyoAxRW9Zb2RaBa0vaxrCxVJ3&s=Dk_7Mrz_rfMyElNy8KwqhIhgPA_q5SQDeirXCJYTZCY&e=" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br><a href="https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qoMuq-6Rx4TBja-YmTB2Dugme5qwZZhndJEsK-qVvkFq5CbppZ4ZN-0vC_NYj6fRCVjcyn0N_AArClw$" target="_blank">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qoMuq-6Rx4TBja-YmTB2Dugme5qwZZhndJEsK-qVvkFq5CbppZ4ZN-0vC_NYj6fRCVjcyn0N_AArClw$</a> <o:p></o:p></p></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal>_______________________________________________<br>fieldtrip mailing list<br><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=tlK7RBNy-D_i9Enf1gYqi-z8d4dFj8ItNQJ8lOt6XjU&m=Wqztp68kBoCt6n2thC9cgh3-Tcrm200Ty2--1jqQyoAxRW9Zb2RaBa0vaxrCxVJ3&s=Dk_7Mrz_rfMyElNy8KwqhIhgPA_q5SQDeirXCJYTZCY&e=" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=tlK7RBNy-D_i9Enf1gYqi-z8d4dFj8ItNQJ8lOt6XjU&m=Wqztp68kBoCt6n2thC9cgh3-Tcrm200Ty2--1jqQyoAxRW9Zb2RaBa0vaxrCxVJ3&s=Dk_7Mrz_rfMyElNy8KwqhIhgPA_q5SQDeirXCJYTZCY&e=</a> <br><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__doi.org_10.1371_journal.pcbi.1002202&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=tlK7RBNy-D_i9Enf1gYqi-z8d4dFj8ItNQJ8lOt6XjU&m=Wqztp68kBoCt6n2thC9cgh3-Tcrm200Ty2--1jqQyoAxRW9Zb2RaBa0vaxrCxVJ3&s=NxM8WEp-uUfbz_a0W-RTkDzQUWh-QRgowN6qgsnOebM&e=" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__doi.org_10.1371_journal.pcbi.1002202&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=tlK7RBNy-D_i9Enf1gYqi-z8d4dFj8ItNQJ8lOt6XjU&m=Wqztp68kBoCt6n2thC9cgh3-Tcrm200Ty2--1jqQyoAxRW9Zb2RaBa0vaxrCxVJ3&s=NxM8WEp-uUfbz_a0W-RTkDzQUWh-QRgowN6qgsnOebM&e=</a> <o:p></o:p></p></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><div><div><p class=MsoNormal><b><span style='font-size:9.5pt;color:#676767'>Songhee Kim, PhD</span></b><span style='font-size:9.5pt;color:black'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:#676767'>Postdoctoral Fellow</span><span style='font-size:9.5pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:#676767'>Department of Neurology</span><span style='font-size:9.5pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:9.5pt;color:black'>Medical College of Wisconsin<o:p></o:p></span></p></div></div></div></div></div></div></div></div></body></html>