<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:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",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:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.gmail-p1, li.gmail-p1, div.gmail-p1
{mso-style-name:gmail-p1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.gmail-s1
{mso-style-name:gmail-s1;}
span.gmail-apple-converted-space
{mso-style-name:gmail-apple-converted-space;}
p.gmail-p2, li.gmail-p2, div.gmail-p2
{mso-style-name:gmail-p2;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.gmail-s2
{mso-style-name:gmail-s2;}
span.gmail-s3
{mso-style-name:gmail-s3;}
p.gmail-p3, li.gmail-p3, div.gmail-p3
{mso-style-name:gmail-p3;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.gmail-p4, li.gmail-p4, div.gmail-p4
{mso-style-name:gmail-p4;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.gmail-p5, li.gmail-p5, div.gmail-p5
{mso-style-name:gmail-p5;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle27
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:721714338;
mso-list-type:hybrid;
mso-list-template-ids:1129606462 -1437728656 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Calibri",sans-serif;
mso-fareast-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Dear Paul,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks. Although I still can’t see how you got to the data that goes into your ft_freqstatistics (the variable names don’t match up), something is probably wrong with your first level-statistics. <o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Have you tried running your stats first without cluster corrections, i.e. cfg.method = ‘analytic’? I would do so (always) and first check the results. I suspect you’ll find something like only NaNs due to perhaps some wrong latencies, design, etc. Around line 244 ft_statistics_montecarlo tries to threshold your first-level statistics. You could also add a breakpoint there and see why it fails, but first running your first-level statistics might already clarify.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Just in case - make sure you empty your cfg before you set your parameters for ft_freqstatistics </span><span style='font-size:11.0pt;font-family:Wingdings;color:#1F497D'>J</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>HTH,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Stephen<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> fieldtrip <fieldtrip-bounces@science.ru.nl> <b>On Behalf Of </b>Paul Dhami<br><b>Sent:</b> Wednesday, January 30, 2019 2:56 PM<br><b>To:</b> fieldtrip@science.ru.nl<br><b>Subject:</b> Re: [FieldTrip] Error: Could not determine the parametric critical value for clustering<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Dear Stephen,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>apologizes for not including that information. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:13.5pt'>The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using:</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:black'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>% frequency analysis<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg <span class=gmail-apple-converted-space> </span>= [];<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.output<span class=gmail-apple-converted-space> </span>= <span class=gmail-s2><span style='color:#A020F0'>'powandcsd'</span></span>;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.method<span class=gmail-apple-converted-space> </span>= <span class=gmail-s2><span style='color:#A020F0'>'mtmconvol'</span></span>;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.foi <span class=gmail-apple-converted-space> </span>= 2:1:60; <span class=gmail-s3><span style='color:forestgreen'>%40</span></span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.t_ftimwin <span class=gmail-apple-converted-space> </span>=<span class=gmail-apple-converted-space> </span>2 ./ cfg.foi; <span class=gmail-s3><span style='color:forestgreen'>%length of the sliding time window in seconds</span></span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.tapsmofrq <span class=gmail-apple-converted-space> </span>= 0.4 *cfg.foi; <span class=gmail-s3><span style='color:forestgreen'>% smoothing increases with increase in freq</span></span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.toi <span class=gmail-apple-converted-space> </span>= -1:0.01:1; <span class=gmail-s3><span style='color:forestgreen'>% -0.4:0.01:0.4</span></span><o:p></o:p></span></p><p class=gmail-p3 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>dataSPfreq = ft_freqanalysis(cfg, dataSPfreq);<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p3 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:black'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>%baseline correction<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg = [];<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.baseline = [-1 -0.1]; <span class=gmail-s3><span style='color:forestgreen'>%-0.4</span></span><span class=gmail-apple-converted-space><span style='color:forestgreen'> </span></span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'>cfg.baselinetype = <span class=gmail-s2><span style='color:#A020F0'>'db'</span></span>;<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'> dataSPfreq = ft_freqbaseline(cfg, dataSPfreq);<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-size:13.5pt'>The call to freqstatistics is as follows:</span><o:p></o:p></p></div><div><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg = [];<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.method<span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'template'</span></span>;<span class=gmail-apple-converted-space> </span><span class=gmail-s2><span style='color:forestgreen'>% using template method</span></span><o:p></o:p></span></p><p class=gmail-p3 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>cfg.template</span></span><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:black'> </span></span><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>= </span></span><span style='font-size:7.5pt;font-family:Courier;color:#A020F0'>'Control_neighb.mat'</span><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>; </span></span><span class=gmail-s2><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>% specify type of template</span></span><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:#A020F0'><o:p></o:p></span></p><p class=gmail-p4 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>cfg.layout</span></span><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:black'> </span></span><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>= </span></span><span class=gmail-s1><span style='font-size:7.5pt;font-family:Courier;color:#A020F0'>'quickcap64.mat'</span></span><span class=gmail-s3><span style='font-size:7.5pt;font-family:Courier;color:black'>;</span></span><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:black'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>% specify layout of sensors<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.feedback<span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'yes'</span></span>; <span class=gmail-apple-converted-space> </span><span class=gmail-s2><span style='color:forestgreen'>% show a neighbour plot</span></span><span class=gmail-apple-converted-space><span style='color:forestgreen'> </span></span><o:p></o:p></span></p><p class=gmail-p5 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'><o:p></o:p></span></p><p class=gmail-p5 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>neighbours<span class=gmail-apple-converted-space> </span>= ft_prepare_neighbours(cfg, MDDSubj_sp_lpfc_freq{1});<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.channel = <span class=gmail-s1><span style='color:#A020F0'>'all'</span></span>;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.latency = [0.01 1] ;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.frequency = <span class=gmail-s1><span style='color:#A020F0'>'all'</span></span> ;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.parameter = <span class=gmail-s1><span style='color:#A020F0'>'powspctrm'</span></span>;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.neighbours<span class=gmail-apple-converted-space> </span>= neighbours; <span class=gmail-s2><span style='color:forestgreen'>% defined as above</span></span><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.method<span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'montecarlo'</span></span>;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.statistic <span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'ft_statfun_indepsamplesT'</span></span>;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.correcttail <span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'alpha'</span></span>;<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.correctm<span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'cluster'</span></span>;<o:p></o:p></span></p><p class=gmail-p4 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>%cfg.alpha = 0.05<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.numrandomization<span class=gmail-apple-converted-space> </span>= 2000;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.minnbchan <span class=gmail-apple-converted-space> </span>= 2;<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.spmversion<span class=gmail-apple-converted-space> </span>= <span class=gmail-s1><span style='color:#A020F0'>'spm12'</span></span>;<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.fsample <span class=gmail-apple-converted-space> </span>= 1000;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'> </span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p5 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'> </span></span><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>Nsub<span class=gmail-apple-converted-space> </span>= length(ControlsSubj_sp_lpfc_freq) + length(MDDSubj_sp_lpfc_freq) ;<span class=gmail-apple-converted-space> </span><o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.design<span class=gmail-apple-converted-space> </span>= [];<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.design(1,1:Nsub)<span class=gmail-apple-converted-space> </span>= [ones(1, length(ControlsSubj_sp_lpfc_freq)) (2*ones(1, length(MDDSubj_sp_lpfc_freq)))];<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>cfg.ivar<span class=gmail-apple-converted-space> </span>= 1;<o:p></o:p></span></p><p class=gmail-p2 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;min-height:12px'><span class=gmail-apple-converted-space><span style='font-size:7.5pt;font-family:Courier'> </span></span><span style='font-size:7.5pt;font-family:Courier'><o:p></o:p></span></p><p class=gmail-p4 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>% Resulting Cluster Corrected Permutation test<o:p></o:p></span></p><p class=gmail-p4 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier;color:forestgreen'>% !!order of structures must follow that specified in the design matrix!!<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'>MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:});<o:p></o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:7.5pt;font-family:Courier'><o:p> </o:p></span></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:13.5pt;font-family:"Arial",sans-serif'>It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering".</span><o:p></o:p></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><o:p> </o:p></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:13.5pt;font-family:"Arial",sans-serif'>Any help would be greatly appreciated.</span><o:p></o:p></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><o:p> </o:p></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:13.5pt;font-family:"Arial",sans-serif'>Thank you,</span><o:p></o:p></p><p class=gmail-p1 style='margin:0in;margin-bottom:.0001pt;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal'><span style='font-size:13.5pt;font-family:"Arial",sans-serif'>Paul</span><o:p></o:p></p></div></div></div></body></html>