[FieldTrip] Frequency bins changed after ft_freqstatistics

Silas Chiu silas_chiu at yahoo.com
Tue Aug 15 15:19:59 CEST 2017

Dear Community,
Nice to meet you all. My name is Ho Ching Chiu, currently working at the language lab in Experimental Psychology, University of Bristol, for a project on sentence comprehension using EEG.
I tried to use ft_freqstatistics to do cluster-based permutation test, for a within-subject comparison of the power spectrum of 19 participants across 2 conditions. (Please refer to the codes below for more details.)Before this, I used ft_freqgrandaverage to conjugate the spectrum of all participants for each conditions, so the input data for the cluster-based permutation test (for each condition) is 4D (subj_chan_freq_time) and size(condition1.powspctrm) = [19 32 125 471].
There was no error / warning message in the process of running ft_freqstatistics. The problem is the frequency bins in the output data. The frequency bin of the input data is 1:1:125, and I expected the output(.stat .prob etc) will have the same dimension of 32 x 125 x 471. But what I get is 32 x 25 x 471, and the .freq of the output becomes 5:5:125, which is not expected.
Could anyone please advice if I have set anything wrong in the process? Or is this some inherent limitation of the ft_freqstatistics function? Your help is much appreciated. Thank you very much.
---------code start---------load condition1 load condition2
cfg = [];
cfg.channel          = 'all';cfg.latency          = 'all';cfg.frequency        = 'all';
cfg.method           = 'montecarlo';cfg.statistic        = 'ft_statfun_depsamplesT';    cfg.correctm         = 'cluster';cfg.clusteralpha     = 0.05;cfg.clusterstatistic = 'maxsum';cfg.minnbchan        = 2;    cfg.tail             = 0;    cfg.clustertail      = 0;    cfg.alpha            = 0.025;    cfg.numrandomization = 5000; 
load neighboursfile % some predefined thingscfg.neighbours       = neighbours;    
% cfg.design not relevant to this question, omitted for simplicity
[stat] = ft_freqstatistics(cfg, condition1, condition2);

 save stat_cond1_cond2 stat;
-------code ends-----------

Best regards,Ho Ching
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170815/f9f817c3/attachment-0001.html>

More information about the fieldtrip mailing list