<div dir="ltr">Dear Stephen,<br><div><br></div><div>apologizes for not including that information. </div><div><br></div><div><font size="4">The data structure (e.g. ControlsSubj_sp_lpfc_freq) was created using:</font></div><div><br></div><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)"><span class="gmail-s1" style="color:rgb(0,0,0)"><span class="gmail-Apple-converted-space"> </span></span>% frequency analysis</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg <span class="gmail-Apple-converted-space"> </span>= [];<span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.output<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s2" style="color:rgb(160,32,240)">'powandcsd'</span>;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.method<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s2" style="color:rgb(160,32,240)">'mtmconvol'</span>;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.foi <span class="gmail-Apple-converted-space"> </span>= 2:1:60; <span class="gmail-s3" style="color:rgb(34,139,34)">%40</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.t_ftimwin <span class="gmail-Apple-converted-space"> </span>=<span class="gmail-Apple-converted-space"> </span>2 ./ cfg.foi; <span class="gmail-s3" style="color:rgb(34,139,34)">%length of the sliding time window in seconds</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.tapsmofrq <span class="gmail-Apple-converted-space"> </span>= 0.4 *cfg.foi; <span class="gmail-s3" style="color:rgb(34,139,34)">% smoothing increases with increase in freq</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.toi <span class="gmail-Apple-converted-space"> </span>= -1:0.01:1; <span class="gmail-s3" style="color:rgb(34,139,34)">% -0.4:0.01:0.4</span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>dataSPfreq = ft_freqanalysis(cfg, dataSPfreq);<span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)"><span class="gmail-s1" style="color:rgb(0,0,0)"><span class="gmail-Apple-converted-space"> </span></span>%baseline correction</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg = [];<span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.baseline = [-1 -0.1]; <span class="gmail-s3" style="color:rgb(34,139,34)">%-0.4<span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space"> </span>cfg.baselinetype = <span class="gmail-s2" style="color:rgb(160,32,240)">'db'</span>;<span class="gmail-Apple-converted-space"> </span></p><p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"> dataSPfreq = ft_freqbaseline(cfg, dataSPfreq);</p></div><div><br></div><div><font size="4">The call to freqstatistics is as follows:</font></div><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg = [];</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.method<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'template'</span>;<span class="gmail-Apple-converted-space"> </span><span class="gmail-s2" style="color:rgb(34,139,34)">% using template method</span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(160,32,240)"><span class="gmail-s3" style="color:rgb(0,0,0)">cfg.template<span class="gmail-Apple-converted-space"> </span>= </span>'Control_neighb.mat'<span class="gmail-s3" style="color:rgb(0,0,0)">; </span><span class="gmail-s2" style="color:rgb(34,139,34)">% specify type of template<span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)"><span class="gmail-s3" style="color:rgb(0,0,0)">cfg.layout<span class="gmail-Apple-converted-space"> </span>= </span><span class="gmail-s1" style="color:rgb(160,32,240)">'quickcap64.mat'</span><span class="gmail-s3" style="color:rgb(0,0,0)">;<span class="gmail-Apple-converted-space"> </span></span>% specify layout of sensors</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.feedback<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'yes'</span>; <span class="gmail-Apple-converted-space"> </span><span class="gmail-s2" style="color:rgb(34,139,34)">% show a neighbour plot<span class="gmail-Apple-converted-space"> </span></span></p>
<p class="gmail-p5" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34);min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p5" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34);min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;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></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.channel = <span class="gmail-s1" style="color:rgb(160,32,240)">'all'</span>;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.latency = [0.01 1] ;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.frequency = <span class="gmail-s1" style="color:rgb(160,32,240)">'all'</span> ;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.parameter = <span class="gmail-s1" style="color:rgb(160,32,240)">'powspctrm'</span>;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.neighbours<span class="gmail-Apple-converted-space"> </span>= neighbours; <span class="gmail-s2" style="color:rgb(34,139,34)">% defined as above</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.method<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'montecarlo'</span>;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.statistic <span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'ft_statfun_indepsamplesT'</span>;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.correcttail <span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'alpha'</span>;<span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.correctm<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'cluster'</span>;</p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)">%cfg.alpha = 0.05</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.numrandomization<span class="gmail-Apple-converted-space"> </span>= 2000;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.minnbchan <span class="gmail-Apple-converted-space"> </span>= 2;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.spmversion<span class="gmail-Apple-converted-space"> </span>= <span class="gmail-s1" style="color:rgb(160,32,240)">'spm12'</span>;<span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.fsample <span class="gmail-Apple-converted-space"> </span>= 1000;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span><span style="color:rgb(34,139,34)"> </span></p>
<p class="gmail-p5" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34);min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;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></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.design<span class="gmail-Apple-converted-space"> </span>= [];</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;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)))];</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">cfg.ivar<span class="gmail-Apple-converted-space"> </span>= 1;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space"> </span></p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)">% Resulting Cluster Corrected Permutation test</p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(34,139,34)">% !!order of structures must follow that specified in the design matrix!!</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">MDD_vs_Controls_sp_lpfc_freq_mcc = ft_freqstatistics(cfg,ControlsSubj_sp_lpfc_freq{:}, MDDSubj_sp_lpfc_freq{:});</p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><br></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" style="" size="4">It is after calling ft_freqstatistics that I get the error "Could not determine the parametric critical value for clustering".</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" size="4"><br></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" size="4">Any help would be greatly appreciated.</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" size="4"><br></font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" size="4">Thank you,</font></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal"><font face="arial, helvetica, sans-serif" style="" size="4">Paul</font></p></div></div>