[FieldTrip] ft_freqstatistics on grandaveraged TFR data

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Jan 10 14:40:58 CET 2017


Hi Kelly,
It could be that you made a small mistake in formatting the input data to ft_freqstatistics (T_LLL and T_LLH). You may want to check whether these data structures have a ‘dimord’ which reads ‘rpt_chan_freq(_time)' or ‘subj_chan_freq(_time)’.

Best,
Jan-Mathijs



J.M.Schoffelen
Senior Researcher, VIDI-fellow
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands



On 09 Jan 2017, at 22:44, Murphy, Kelly (Research Student) <murphyk5 at aston.ac.uk<mailto:murphyk5 at aston.ac.uk>> wrote:

Hello Fieldtrippers,

I am trying to use a monte carlo permutation test using ft_freqstatistics on grandaveraged data over 8 participants for two independent conditions but I am struggling to create the correct design matrix using the following code:

cfg = [];   cfg.method = 'montecarlo';    cfg.computestat = 'yes';  cfg.statistic = 'indepsamplesT'; cfg.numrandomization = 500;   cfg.correctm = 'fdr';  cfg.computecritval = 'yes'; cfg.alpha = 0.025; cfg.tail = 0; cfg.clustertail = 0;   cfg.clusterstatistic = 'maxsum';    cfg.minnbchan = 2;
design = zeros(1,size(T_LLL.powspctrm,1) + size(T_LLH.powspctrm,1));
design(1,1:size(T_LLL.powspctrm,1)) = 1;
design(1,(size(T_LLL.powspctrm,1)+1):(size(T_LLL.powspctrm,1)+size(T_LLH.powspctrm,1))) = 2;
cfg.design           = design;
cfg.ivar             = 1;
[stat] = ft_freqstatistics(cfg, T_LLL, T_LLH);

I am left with the following error message:
"Error using ft_freqstatistics (line 174)
the length of the design matrix (1) does not match the number of observations
in the data (2)"


I am struggling to see what errors I am making and I have tried my best to adhere to the guidelines outlined on the Fieldtrip tutorials, so if anyone with a keen eye can offer any help it would be most appreciated!

Many thanks

Kelly


PhD candidate
Department of Psychology
Aston University
Birmingham B4 7ET
United Kingdom

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip


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


More information about the fieldtrip mailing list