<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1502796906636_10075">Dear Community,</div><div id="yui_3_16_0_ym19_1_1502796906636_10075"><br></div><div id="yui_3_16_0_ym19_1_1502796906636_10075">Nice to meet you all. My name is Ho Ching Chiu, currently working at the language lab in Experimental Psychology, University of Bristol, for a project on sentence comprehension using EEG.</div><div id="yui_3_16_0_ym19_1_1502796906636_10075"><br></div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr">I tried to use ft_freqstatistics to do cluster-based permutation test, for a within-subject comparison of the power spectrum of 19 participants across 2 conditions. (Please refer to the codes below for more details.)</div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr">Before this, I used ft_freqgrandaverage to conjugate the spectrum of all participants for each conditions, so the input data for the cluster-based permutation test (for each condition) is 4D (subj_chan_freq_time) and size(condition1.powspctrm) = [19 32 125 471].</div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr">There was no error / warning message in the process of running ft_freqstatistics. The problem is the frequency bins in the output data. The frequency bin of the input data is 1:1:125, and I expected the output(.stat .prob etc) will have the same dimension of 32 x 125 x 471. But what I get is 32 x 25 x 471, and the .freq of the output becomes 5:5:125, which is not expected.</div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr">Could anyone please advice if I have set anything wrong in the process? Or is this some inherent limitation of the ft_freqstatistics function? Your help is much appreciated. Thank you very much.</div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1502796906636_10075" dir="ltr">---------code start---------</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10628">load condition1 </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10629">load condition2</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10630"><br id="yui_3_16_0_ym19_1_1502796906636_10631"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10632">cfg = [];<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10634">cfg.channel = 'all';</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10635">cfg.latency = 'all';</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10636">cfg.frequency = 'all';<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10638">cfg.method = 'montecarlo';</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10639">cfg.statistic = 'ft_statfun_depsamplesT'; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10640">cfg.correctm = 'cluster';</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10641">cfg.clusteralpha = 0.05;</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10642">cfg.clusterstatistic = 'maxsum';</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10643">cfg.minnbchan = 2; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10646">cfg.tail = 0; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10648">cfg.clustertail = 0; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10649">cfg.alpha = 0.025; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10650">cfg.numrandomization = 5000; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10651"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10656">load neighboursfile % some predefined things</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10657">cfg.neighbours = neighbours; </div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10658"><br id="yui_3_16_0_ym19_1_1502796906636_10659"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10658">% cfg.design not relevant to this question, omitted for simplicity</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10658"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10660">[stat] = ft_freqstatistics(cfg, condition1, condition2);<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10679"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10679"> save stat_cond1_cond2 stat;<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10679">-------code ends-----------</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10679"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_10679"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_11503">Best regards,</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_11504">Ho Ching</div><div dir="ltr" id="yui_3_16_0_ym19_1_1502796906636_11505"><br id="yui_3_16_0_ym19_1_1502796906636_11506"></div></div></body></html>