<div dir="ltr"><div dir="ltr"><div>Dear all,</div><div><br></div><div>I refer to a previous post regarding 'question about coherenece statistics for group analysis related to J. Neuroscience 2011 and Science 2005 (both papers by Jan-Mathijs Schoffelen).<br>
</div><div><br></div><div>I tried to follow the suggestions regarding the comparison of coherence for two conditions.</div><div><br></div><div>This is what I set up for my case:</div><div><br></div><div>cfg = [];</div><div>
cfg.keeptrials = 'no';</div><div>cfg.channel = {'all'}; (there are 60 EEG channels in this case).</div><div>cfg.channelcmb = {cfg.channel, cfg.channel};</div><div><br></div><div>freq1 = ft_connectivityanalysis(cfg, cond1); %this is done for 5 subjects separately</div>
<div>freq2 = ft_connectivityanalysis(cfg, cond2); %this is done for 5 subjects separately</div><div><br></div><div>freq1 = atanh(freq1.cohspctrm) - atanh(freq2.cohspctrm); %this is done for 5 subjects separately</div><div>
freq2.cohspctrm(:) = 0; %this is done for 5 subjects separately</div><div><br></div><div><div>cfg = [];</div><div>cfg.layout = 'EEG1010.lay';</div><div>cfg.latency = 'all';</div><div>cfg.avgovertime = 'no';</div>
<div>cfg.parameter = 'cohspctrm';<br></div><div>cfg.method = 'montecarlo';</div><div>cfg.statistic = 'diff';</div><div>cfg.tail = 0;<br></div><div>cfg.alpha = 0.05; <br></div><div>cfg.numrandomization = 10000;</div>
<div>cfg.ivar = 2;</div><div>cfg.uvar = 1;</div><div><br></div><div>% design matrices</div><div>clear design;</div><div>design(1,:) = [1:5, 1:5];</div><div>design(2,:) = [ones(1,5), ones(1,5) * 2];</div><div>cfg.design = design;</div>
<div><br></div><div>cfg.avgoverfreq = 'yes';</div><div>cfg.frequency = [2 4]; % this will be performed for different frequency bands</div><div>[prec200_delta_stat] = ft_freqstatistics(cfg, sub01_freq1, sub02_freq1,  sub03_freq1,  sub04_freq1,  sub05_freq1, sub01_freq2, sub02_freq2,  sub03_freq2,  sub04_freq2,  sub05_freq2);</div>
<div><br></div></div><div>However, when I tried to run this script, I get an error message:</div><div><br></div><div><div>Reference to non-existent field 'label'.</div><div><br></div><div>Error in ft_freqstatistics (line 131)</div>
<div>  haschan(i)  = ~isempty(strfind(varargin{i}.dimord, 'chan')) ...</div></div><div><br></div><div>Can someone please help?</div><div><br></div><div>Thanks!</div><div><br></div><div>Cheers,</div><div>Hweeling</div>
<div><br></div><div><br></div></div>
</div>