<div dir="ltr">Dear Community, <div><br></div><div>I am trying to test my baseline condition for ERP in the time domain using ft_statfun_actvsblt but I keep getting the error.</div><div>"<span style="color:rgb(3,47,98);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">Inappropriate dimord for the statistics function FT_STATFUN_ACTVSBLT" </span></div><div> </div><div>Looking through the code for the function I found this snippet. </div><div><table class="gmail-highlight gmail-tab-size gmail-js-file-line-container" style="box-sizing:border-box;border-collapse:collapse;border-spacing:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"></tr><tr style="box-sizing:border-box"><td id="gmail-LC77" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">
switch</span> cfg.dimord</td></tr><tr style="box-sizing:border-box"><td id="gmail-L78" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC78" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">case</span> <span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>chan_freq_time'</span></td></tr><tr style="box-sizing:border-box"><td id="gmail-L79" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC79" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> nchan = cfg.dim(<span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">1</span>);</td></tr><tr style="box-sizing:border-box"><td id="gmail-L80" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC80" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> nfreq = cfg.dim(<span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">2</span>);</td></tr><tr style="box-sizing:border-box"><td id="gmail-L81" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC81" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> ntime = cfg.dim(<span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">3</span>);</td></tr><tr style="box-sizing:border-box"><td id="gmail-L82" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC82" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> [nsmpls,nrepl] = size(dat);</td></tr><tr style="box-sizing:border-box"><td id="gmail-L83" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC83" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">otherwise</span></td></tr><tr style="box-sizing:border-box"><td id="gmail-L84" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC84" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"> ft_error(<span class="gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>Inappropriate dimord for the statistics function FT_STATFUN_ACTVSBLT.<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span>);</td></tr><tr style="box-sizing:border-box"><td id="gmail-L85" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td><td id="gmail-LC85" class="gmail-blob-code gmail-blob-code-inner gmail-js-file-line" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;overflow:visible;white-space:pre"><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">end</span></td></tr><tr style="box-sizing:border-box"><td id="gmail-L86" class="gmail-blob-num gmail-js-line-number" style="box-sizing:border-box;padding:0px 10px;color:rgba(27,31,35,0.3);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;line-height:20px;min-width:50px;text-align:right;vertical-align:top;white-space:nowrap;width:50px"></td></tr></tbody></table>Does this mean this function is inappropriate to use for time-domain data? If so, could anyone suggest an alternative I might use? Below is the code I have been using. </div> cfg = [];<br> cfg.method = 'montecarlo';<br> cfg.statistic = 'actvsblt';<br> cfg.correctm = 'cluster';<br> cfg.clusteralpha = 0.05;<br> cfg.clusterstatistic = 'maxsum';<br> cfg.minnbchan = 2;<br> cfg_neighb = [];<br> cfg_neighb.method = 'distance'; <br> cfg.neighbours = ft_prepare_neighbours(cfg_neighb, allData_activation{jj,1});<br> cfg.tail = 0;<br> cfg.clustertail = 0;<br> cfg.alpha = 0.025;<br> cfg.numrandomization = 1000;<br><br> subj = size(allData_activation,1);<br> design = zeros(2,2*subj);<br> for i = 1:subj<br> design(1,i) = i;<br> end<br> for i = 1:subj<br> design(1,subj+i) = i;<br> end<br> design(2,1:subj) = 1;<br> design(2,subj+1:2*subj) = 2;<br><br> cfg.design = design;<br> cfg.uvar = 1;<br> cfg.ivar = 2;<br><br> stat{jj,1} = ft_timelockstatistics(cfg, allData_activation{:,jj}, allData_baseline{:,jj});<br><div> <br class="gmail-Apple-interchange-newline"></div></div>