[FieldTrip] between-subject cluster-stats wont average over specified frequency

Peter Goodin pgoodin at swin.edu.au
Wed Oct 26 23:36:32 CEST 2016


Hi George,

There's a typo in cfg.frequency (in the script it reads cfg.frequnecy).

This could explain the behaviour.

Peter

On 27 Oct 2016 07:58, George McKenzie Opie <george.opie at adelaide.edu.au> wrote:

Hi all,


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.


cfg = [];
cfg.channel     = {'all'};
cfg.minnbchan        = 2;
cfg.clusteralpha = 0.01;
cfg.clusterstatistic = 'maxsum';
cfg.alpha       = 0.05;
cfg.latency     = [0.025, 0.220];
cfg.avgoverfreq = 'yes';
cfg.frequnecy = [31 45];
cfg.avgovertime = 'yes';
cfg.avgoverchan = 'no';
cfg.statistic   = 'indepsamplesT';
cfg.numrandomization = 2000;
cfg.correctm    = 'cluster';
cfg.method      = 'montecarlo';
cfg.tail             = 0;
cfg.clustertail      = 0;
cfg.neighbours  = neighbours;
cfg.parameter   = 'powspctrm';

design = zeros(1,size(D1.powspctrm,1) + size(D2.powspctrm,1));
design(1,1:size(D1.powspctrm,1)) = 1;
design(1,(size(D1.powspctrm,1)+1):(size(D1.powspctrm,1) + size(D2.powspctrm,1)))= 2;

cfg.design = design;
cfg.ivar  = 1;

[stat] = ft_freqstatistics(cfg, D1, D2);



kind regards,


George Opie

ARC Research Associate
Discipline of Physiology
School of Medicine
The University of Adelaide, AUSTRALIA 5005
Ph    : +61 8 8313 4157
Fax   : +61 8 8303 5384
e-mail: george.opie at adelaide.edu.au<mailto:george.opie at adelaide.edu.au>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161026/5b0f258c/attachment-0002.html>


More information about the fieldtrip mailing list