<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jan-Mathijs,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you for your help.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My cfg.clusterthreshold was set to the default "parametric". I changed it to "nonparametric_common" and now ft_freqstatistics runs without any errors.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Matthew</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip@science.ru.nl><br>
<b>Sent:</b> Friday, May 28, 2021 1:54 PM<br>
<b>To:</b> FieldTrip discussion list <fieldtrip@science.ru.nl><br>
<b>Cc:</b> Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen@donders.ru.nl><br>
<b>Subject:</b> [EXTERNAL] Re: [FieldTrip] New issue with ft_statistics_montecarlo</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">
<table border="3" width="100%" cellspacing="0" cellpadding="0" style="border-color:#020580; background-color:#fffae5">
<tbody>
<tr>
<td><strong><span style="color:#ff6600">  **<span style="text-decoration:underline">EXTERNAL EMAIL</span>**</span></strong><br>
  This email originated outside of The University of Texas at San Antonio.<br>
  Please exercise caution when clicking on links or opening attachments.</td>
</tr>
</tbody>
</table>
<p> </p>
<div>Hi Matthew,
<div class=""><br class="">
</div>
<div class="">The error tells you that it is impossible to determine a parametric critical value for clustering.</div>
<div class=""><br class="">
</div>
<div class="">You should either:</div>
<div class=""><br class="">
</div>
<div class="">-specify a cfg.statistic that points to an ft_statfun_something that internally contains some code that does the computation of the critical value. This typically pertains to a statistic for which known parametric distributions exist, e.g. a T-statistic,
 or an F-statistic.</div>
<div class=""><br class="">
</div>
<div class="">-explicitly set a cfg.clustercritval to be an upper and lower numeric threshold for clustering.</div>
<div class=""><br class="">
</div>
<div class="">-use a different specification of cfg.clusterthreshold, e.g. ’nonparametric_common’.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 28 May 2021, at 19:45, Matthew Wood via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Hello,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
I have had a script for my statistics that uses ft_statistics_montecarlo for the method in ft_freqstatistics. I downloaded the latest version of FieldTrip recently and now my scripts do not work. I get the following errors:</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Error using ft_statistics_montecarlo (line 250)
<div class="">could not determine the parametric critical value for clustering</div>
<div class=""><br class="">
</div>
<div class="">Error in ft_freqstatistics (line 194)</div>
<div class=""> [stat, cfg] = statmethod(cfg, dat, design);</div>
 <br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
I'm not sure what could be driving this issue, especially since I have made no changes to the script. The only thing that changed was downloading the lastest version of Fieldtrip. Is anyone else experiencing this? Or does anyone have advice into how it works?</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
I've looked up the error message and one user recommended testing that running with cfg.method = 'analytic' works. I've done this and my script runs fine. The structure it outputs gives me appropriate values (no NaNs).</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
I'd be happy to give more context if needed.</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
<br class="">
</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Thank you,</div>
<div class="" style="font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt">
Matthew</div>
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">fieldtrip
 mailing list</span><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=04%7C01%7Cmatthew.wood%40utsa.edu%7C07c555ce059f4ed7655508d9220a6415%7C3a228dfbc64744cb88357b20617fc906%7C0%7C1%7C637578250302457467%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=9n1QQM2SLcSYs%2FufyDLMZgJK210caRIzycyU6DIc%2BOI%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="V8lRbY9LZfqu2DNGlFlV2Bw+Bh47zt2+V3vwH8KE+bx+hBiG8wqP1yzVnjehud/WnmdpEXg5FiPAIDc4tY5fgGaNpV9lzSqqkpJZAhCo0Olg04AuzkVDUELglHZJL4euxfmQ73/XAn7hmmJHmWvlFqoUqZvDVR+8mwTSV7QDCbw=" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202__%3B!!HJOPV4FYYWzcc1jazlU!qZXip18fjkOlhyC8N8yyVeuaGRZPp1nMtGmksN0vSADy__tyUsGQD-en76I_KWpv8qnl71mK%24&data=04%7C01%7Cmatthew.wood%40utsa.edu%7C07c555ce059f4ed7655508d9220a6415%7C3a228dfbc64744cb88357b20617fc906%7C0%7C1%7C637578250302467456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IvZBroo1WXkRjCEyZNbA2ouBIgWMuAi1qXXyj3bOfoQ%3D&reserved=0" originalsrc="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qZXip18fjkOlhyC8N8yyVeuaGRZPp1nMtGmksN0vSADy__tyUsGQD-en76I_KWpv8qnl71mK$" shash="nU4L0wDmsbm2dwGeAAPQavRtdAlhQc2lMmIKty1MlSyrUhCLtljdnyS5bgoIAFaLhyvidMuAofvTXS5ixVRgS6xm81L3E/bDHVQXPxBrRwCgr1c+HCL9DYrnHS+VWYjXr+lzCD5qtGbgpaXTewmbFX7aQlzDq7TXwuiRb1361EQ=" class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qZXip18fjkOlhyC8N8yyVeuaGRZPp1nMtGmksN0vSADy__tyUsGQD-en76I_KWpv8qnl71mK$</a><span class="" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important"></span></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>