<div dir="ltr">Dear FieldTrippers:<div><br></div><div>I am trying to run inter-trial-coherence (ITC) at the group level using '
ft_freqstatistics' with
cfg.statistic = 'diff_itc'; </div><div>Here the input is the complex Fourier spectrum from 'ft_freqanalysis', with the dimension of 'rpttap_chan_freq_time' (with trial dimension). And the design matrix is constructed from subject numbers (without trial dimension). </div><div>The error is 'the length of the design matrix does not match the number of observations in the data'</div><div>But the
ft_statfun_diff_itc requires 'complex
Fourier spectrum
' with the trial dimension as input. </div><div>I am so confused about: 1. keeping the trial dimension as input or not? 2. how to make the design matrix here?</div><div><br></div><div>Followings are the setups:</div><div><br></div><div>cfg = [];<br>cfg.method = 'montecarlo';<br>cfg.correctm = 'cluster';<br>cfg.clusterthreshold = 'nonparametric_common';<br>cfg.clusteralpha = 0.05;<br>cfg.clusterstatistic = 'maxsum';<br></div><div>cfg.tail = 0;<br>cfg.clustertail = 0;<br>cfg.alpha = 0.025;</div><div><div>cfg.minnbchan = 2;</div><div>cfg.neighbours = neighbours; <br></div>cfg.numrandomization= 500;<br>cfg.statistic = 'diff_itc';<br>cfg.parameter = 'fourierspctrm';<br>nsubj = 5;<br>design = [1:nsubj 1:nsubj; ones(1,nsubj) ones(1,nsubj)*2];<br>cfg.design = design;<br>cfg.uvar = 1;<br>cfg.ivar = 2;<br>stat = ft_freqstatistics(cfg, freq_low_all{:}, freq_high_all{:});<br><br></div><div> </div><div>Thank you very much in advance!</div><div><br></div><div>Best wishes</div><div>yali</div><div><br></div></div>