[FieldTrip] Group analysis for inter-trial-coherence

Yali Pan yalipan666 at gmail.com
Mon Oct 28 21:23:30 CET 2019


Dear FieldTrippers:

I am trying to run inter-trial-coherence (ITC) at the group level using '
ft_freqstatistics' with  cfg.statistic  = 'diff_itc';
Here the input is the complex Fourier spectrum from 'ft_freqanalysis', with
the dimension of 'rpttap_chan_freq_time' (with trial dimension). And the
design matrix is constructed from subject numbers (without trial
dimension).
The error is 'the length of the design matrix does not match the number of
observations in the data'
But the  ft_statfun_diff_itc requires 'complex Fourier spectrum ' with the
trial dimension as input.
I am so confused about: 1. keeping the trial dimension as input or not? 2.
how to make the design matrix here?

Followings are the setups:

cfg                            = [];
cfg.method               = 'montecarlo';
cfg.correctm             = 'cluster';
cfg.clusterthreshold  = 'nonparametric_common';
cfg.clusteralpha        = 0.05;
cfg.clusterstatistic     = 'maxsum';
cfg.tail                       = 0;
cfg.clustertail            = 0;
cfg.alpha                  = 0.025;
cfg.minnbchan         = 2;
cfg.neighbours         = neighbours;
cfg.numrandomization= 500;
cfg.statistic               = 'diff_itc';
cfg.parameter          = 'fourierspctrm';
nsubj                        = 5;
design                      = [1:nsubj 1:nsubj; ones(1,nsubj)
ones(1,nsubj)*2];
cfg.design                = design;
cfg.uvar                   = 1;
cfg.ivar                    = 2;
stat                          = ft_freqstatistics(cfg, freq_low_all{:},
freq_high_all{:});


Thank you very much in advance!

Best wishes
yali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20191028/7675aaeb/attachment.html>


More information about the fieldtrip mailing list