<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<p dir="ltr">Hi George,</p>
<p dir="ltr">There's a typo in cfg.frequency (in the script it reads cfg.frequnecy).</p>
<p dir="ltr">This could explain the behaviour.</p>
<p dir="ltr">Peter</p>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 27 Oct 2016 07:58, George McKenzie Opie <george.opie@adelaide.edu.au> wrote:<br type="attribution">
<blockquote class="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). Any help would be very much appreciated.</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,1)) = 1;<br>
design(1,(size(D1.powspctrm,1)+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 style="margin:0cm 0cm 10pt"><font face="Calibri" size="3">George Opie</font></p>
<p 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="mailto:george.opie@adelaide.edu.au"><font face="Calibri" color="#0000ff" size="3">george.opie@adelaide.edu.au</font></a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>