Dear George,<div><br></div><div>You have a typo in the cfg at cfg.frequency.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Julian<br><br>Am Mittwoch, 26. Oktober 2016 schrieb George McKenzie Opie :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<p>Hi all,</p>
<p><br>
</p>
<p>Im trying to run some between-subject cluster-based analyses on some time-frequency data, but am having some issues getting the analysis to average over a specified frequency range. For some reason this only happens with between-subject comparisons and not
within-subject. My cfg structure is shown below. D1 and D2 are grandaverage data from two groups calculated using ft_freqgrandaverage. When I call ft_freqstatistics with this cfg, it averages over all frequencies (5 - 45 Hz), instead of the specified frequency
range (31 - 45 Hz). A<span>ny help would be very much appreciated.</span></p>
<p><br>
</p>
<div>cfg = [];<br>
cfg.channel = {'all'};<br>
cfg.minnbchan = 2;<br>
cfg.clusteralpha = 0.01;<br>
cfg.clusterstatistic = 'maxsum';<br>
cfg.alpha = 0.05; <br>
cfg.latency = [0.025, 0.220];<br>
cfg.avgoverfreq = 'yes';<br>
cfg.frequnecy = [31 45];<br>
cfg.avgovertime = 'yes'; <br>
cfg.avgoverchan = 'no';<br>
cfg.statistic = 'indepsamplesT';<br>
cfg.numrandomization = 2000;<br>
cfg.correctm = 'cluster';<br>
cfg.method = 'montecarlo'; <br>
cfg.tail = 0;<br>
cfg.clustertail = 0;<br>
cfg.neighbours = neighbours;<br>
cfg.parameter = 'powspctrm';<br>
<br>
design = zeros(1,size(D1.powspctrm,1) + size(D2.powspctrm,1));<br>
design(1,1:size(D1.powspctrm,<wbr>1)) = 1;<br>
design(1,(size(D1.powspctrm,1)<wbr>+1):(size(D1.powspctrm,1) + size(D2.powspctrm,1)))= 2;<br>
<br>
cfg.design = design; <br>
cfg.ivar = 1; <br>
<br>
[stat] = ft_freqstatistics(cfg, D1, D2);</div>
<br>
<p></p>
<p><br>
</p>
<p>kind regards,<br>
</p>
<p><br>
</p>
<div>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<p class="MsoNormal" style="margin:0cm 0cm 10pt"><font face="Calibri" size="3">George Opie</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 10pt"><font face="Calibri" size="3">ARC Research Associate<br>
Discipline of Physiology<br>
School of Medicine<br>
The University of Adelaide, AUSTRALIA 5005<br>
Ph : +61 8 8313 4157<br>
Fax : +61 8 8303 5384<br>
e-mail: </font><a href="javascript:_e(%7B%7D,'cvml','george.opie@adelaide.edu.au');" target="_blank"><font face="Calibri" color="#0000ff" size="3">george.opie@adelaide.<wbr>edu.au</font></a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>