<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Pia,
<div class=""><br class="">
</div>
<div class="">In order to debug this further I would like to suggest that you put a breakpoint in ft_statistics_montecarlo, at line 247 (which in my latest fieldtrip version reads: cfg.clustercritval = getfield(statfun(tmpcfg, dat, design), 'critval');)</div>
<div class="">Then, you need to execute the following function call on the matlab command line: s=statfun(tmpcfg, dat, design); </div>
<div class="">I that results in an error, you may want to investigate why this is the case, otherwise you may want to inspect the output variable s, which should contain a field called critval. </div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 20 Nov 2023, at 11:36, Pia Reinfeld via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class="">Hi Jan-Mathijs,<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">thank you for your quick response!<br class="">
I did specify this option, but I forgot to include it in the code-snipped, sorry for that!<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">So it looks like that:<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg = [];<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.channel = {'all', '-ECG'};<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.statistic = 'ft_statfun_correlationT';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.method = 'montecarlo';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.computestat = 'yes';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.computecritval = 'yes';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.computeprob = 'yes';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.alpha = 0.05;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.tail = 0;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.correcttail = 'alpha';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.numrandomization = 10000;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.correctm = 'cluster';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.clusterstatistic = 'maxsum';<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.alpha = 0.025;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.clustertail = 0;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.clusteralpha = 0.05;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.neighbours = neighbours;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> design = [];<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> n1 = length(target); % number of subjects<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> design(1,1:n1) = fraction_ES_N;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.design = design;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> cfg.ivar = 1;<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> <o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> stat = ft_timelockstatistics(cfg, diff{:});<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">The complete error is:<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Error using ft_statfun_correlationT<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">P-values can only be calculated if the test statistics are calculated.<span class="Apple-converted-space"> </span><br class="">
Error using ft_statistics_montecarlo could not determine the parametric critical value for clustering<span class="Apple-converted-space"> </span><br class="">
Error in ft_timelockstatistics (line 185) [stat, cfg] = statmethod(cfg, dat, design);<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">So I found in line 66 of ft_statfun_correlationT.m, where it checks if the test stats are calculated, so that the probability can be calculated:<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">if strcmp(cfg.computeprob, 'yes') && strcmp(cfg.computestat, 'no')<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> ft_error('P-values can only be calculated if the test statistics are calculated.');<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">end<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">But this if statement should be false, because as you can see in my configuration I defined both as ‘yes’. So my configuration might be overwritten within in the scripts or am I wrong?<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Thank you again and all the best,<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Pia<o:p class=""></o:p></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""><o:p class=""> </o:p></span></div>
<div class="">
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class="">Von:</b><span class="Apple-converted-space"> </span>fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" class="">fieldtrip-bounces@science.ru.nl</a>><span class="Apple-converted-space"> </span><b class="">Im Auftrag von<span class="Apple-converted-space"> </span></b>Schoffelen,
J.M. (Jan Mathijs) via fieldtrip<br class="">
<b class="">Gesendet:</b><span class="Apple-converted-space"> </span>Samstag, 18. November 2023 17:56<br class="">
<b class="">An:</b><span class="Apple-converted-space"> </span>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Cc:</b><span class="Apple-converted-space"> </span>Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
<b class="">Betreff:</b><span class="Apple-converted-space"> </span>Re: [FieldTrip] Correction for MCP using ft_statfun_correlationT<o:p class=""></o:p></div>
</div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Hi Pia,<o:p class=""></o:p></div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
<o:p class=""></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
On 17 Nov 2023, at 17:55, Pia Reinfeld via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" style="color: purple; text-decoration: underline;" class="">fieldtrip@science.ru.nl</a>> wrote:<o:p class=""></o:p></div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Dear community,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">I am currently working on statistically testing the correlation between EEG data (dependent variable) and quantitative data (independent variable).</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">I'm using the ft_statfun_correlationT function to correlate and test the quantitative independent variable (e.g. reaction time), which is one value per subject, with the subject's averaged ERP data (31channelx500timepoints) (~100
subjects). I used this configuration from the tutorial and it worked well:</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<i class=""><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(96, 160, 176);" class="">% compute statistics with correlationT</span></i><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">[];</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">.</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">statistic <span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 112, 160);" class="">'ft_statfun_correlationT'</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">.</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">method <span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 112, 160);" class="">'montecarlo'</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">.</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">numrandomization<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 160, 112);" class="">1000</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">n1<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 160, 112);" class="">99</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">; </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">design(</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 160, 112);" class="">1</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">,</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 160, 112);" class="">1</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">:n1) <span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">qualitative_variable;
% e.g. [0.25, 0.22, …]</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">.</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">design <span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">design;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">cfg</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">.</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">ivar <span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(64, 160, 112);" class="">1</span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: rgb(240, 240, 240);" class="">
<span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">stat<span class="apple-converted-space"> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(102, 102, 102);" class="">=</span><span class="apple-converted-space"><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class=""> </span></span><span lang="EN-GB" style="font-size: 10pt; font-family: Consolas; color: rgb(33, 37, 41);" class="">ft_freqstatistics(cfg,
data_brain{:});</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">I saw that the t-values are calculated by using this:</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">tstat = rho*(sqrt(nrepl-2))./sqrt((1-rho.^2))</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">I'm afraid I don't know much about statistics. But wouldn't it be appropriate to correct for the multiple comparison problem by using a cluster-based approach?</span><o:p class=""></o:p></div>
</div>
</div>
</blockquote>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Yes, that should be possible.<o:p class=""></o:p></div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
<o:p class=""></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">So I tried to add this to my configuration:</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">cfg.alpha = 0.025;<span class="apple-converted-space"> </span><br class="">
cfg.correcttail = 'alpha';<span class="apple-converted-space"> </span><br class="">
cfg.correctm = 'cluster';<span class="apple-converted-space"> </span></span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">cfg.clustertail = 0;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">cfg.clusteralpha = 0.05;<br class="">
cfg.clusterstatistic = 'maxsum';<span class="apple-converted-space"> </span><br class="">
cfg.neighbours = neighbours;</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">I get the error:<span class="apple-converted-space"> </span><br class="">
Error using ft_statistics_montecarlo could not determine the parametric critical value for clustering</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Error in ft_timelockstatistics (line 185)</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">[stat, cfg] = statmethod(cfg, dat, design);</span> <o:p class=""></o:p></div>
</div>
</blockquote>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
The error is caused by the fact that the function that is used under the hood for the computation of the (t-scored) correlation value - i.e. ft_statfun_correlationT did not properly compute the corresponding parametric p-value. This is due to the fact that
most likely, you did not specify cfg.computeprob = ‘yes’, which is needed to overrule the default value for this parameter (which happens to be ’no’).<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
I hope that this helps.<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Best wishes,<o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Jan-Mathijs<o:p class=""></o:p></div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
<br class="">
<o:p class=""></o:p></div>
<blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class="">
<div class="">
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Is there already a correction for MCP and am I thinking wrongly by using a cluster based approach?</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">How is the cfg.numrandomization implemented in this statistic? I may have missed something, but it didn't look like random permutation was being used at all.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Any help would be highly appreciated.</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class=""> </span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Thank you very much and all the best,</span><o:p class=""></o:p></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-GB" class="">Pia</span><o:p class=""></o:p></div>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class="">_______________________________________________<br class="">
fieldtrip mailing list<br class="">
</span><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C0e55a93d18e24c90844708dbec316e41%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638363469266588288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QKiJVLCcv7Q1wTKehmzFj6fo03FbybsSCuFeF%2FeJcnU%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="Qj52DKs4oNX1AdtzzLl94oEKjhafbqq0/jPGf15yUOns6tOXrJl1isZJbgsWZvMjYL7mFj9RSi1XeVKgWuAkBgjWnwYs5CXI5rYFn5e9jkMoanGOdvptRT9EL3IjSFPLyQm0haZ2OPCLWmBKOvZy0sZYTxUk4P3DAnagbOHpqdY=" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="xvpAmN6fKufARgSUvMcLj0E1Yj0UV54pR83dzbIaNQIPHsYBJTzNJuTEEDzA5HFNM7G2CWwzJIh2gqNo8sQ4tGFeQMSw1XMAwYow1aW5Z9EQ7V0MXmGSDo6LqMDXim1KWADp/50gCYIVSoeRgUfyXcPH3X5ar/t3IR3whLcMFyk=" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif; color: rgb(149, 79, 114);" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</span></a><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif;" class=""><br class="">
</span><a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C0e55a93d18e24c90844708dbec316e41%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638363469266588288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BAq0RiVN3hc5a27eQw5SwEI%2FQP3IWiDYAu3yMaxnbBw%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="HfSo/egRsm60ORLhbUR+i9jM2ziskwtKDYfi3+oMuy6wuqUAgaDRZpQZQFxKUUpt8CRSQAq5KqI449w+t1U10gb4bjW7OZskxTQPYRA/f0NinzXEvSRZBaMUUTNiHBgayuNQ2W89FZCtz5VMjHlKPXj3VgmxWdks2ZurRpkZkOo=" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="FFwHNghaL/AgsQ2Sg1EcLCC8cibelPm2JsEkFxOGkk1DJhl+HWG9CnxiJT8A08shKPJvd+9ZY+0mym7YCAFSXFfszwJM8ybUi6gcj1sGKqUMHp04JAM/5LNAsuMhqm3P3L3ja5zRvNViWHxdBr4lFkpBJHsNzbkHH2aa/iXdXi4=" style="color: purple; text-decoration: underline;" class=""><span style="font-size: 10.5pt; font-family: Helvetica, sans-serif; color: rgb(149, 79, 114);" class="">https://doi.org/10.1371/journal.pcbi.1002202</span></a><o:p class=""></o:p></div>
</div>
</blockquote>
</div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fieldtrip
mailing list</span><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C0e55a93d18e24c90844708dbec316e41%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638363469266588288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QKiJVLCcv7Q1wTKehmzFj6fo03FbybsSCuFeF%2FeJcnU%3D&reserved=0" originalsrc="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" shash="Qj52DKs4oNX1AdtzzLl94oEKjhafbqq0/jPGf15yUOns6tOXrJl1isZJbgsWZvMjYL7mFj9RSi1XeVKgWuAkBgjWnwYs5CXI5rYFn5e9jkMoanGOdvptRT9EL3IjSFPLyQm0haZ2OPCLWmBKOvZy0sZYTxUk4P3DAnagbOHpqdY=" style="color: purple; text-decoration: underline; 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; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C01%7Cfieldtrip%40science.ru.nl%7C0e55a93d18e24c90844708dbec316e41%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638363469266588288%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BAq0RiVN3hc5a27eQw5SwEI%2FQP3IWiDYAu3yMaxnbBw%3D&reserved=0" originalsrc="https://doi.org/10.1371/journal.pcbi.1002202" shash="HfSo/egRsm60ORLhbUR+i9jM2ziskwtKDYfi3+oMuy6wuqUAgaDRZpQZQFxKUUpt8CRSQAq5KqI449w+t1U10gb4bjW7OZskxTQPYRA/f0NinzXEvSRZBaMUUTNiHBgayuNQ2W89FZCtz5VMjHlKPXj3VgmxWdks2ZurRpkZkOo=" style="color: purple; text-decoration: underline; 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; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://doi.org/10.1371/journal.pcbi.1002202</a></div>
</blockquote>
</div>
<br class="">
</body>
</html>