[FieldTrip] Granger Causality & ft_timelockstatistics

Seymour, Robert (Research Student) seymourr at aston.ac.uk
Thu Mar 16 18:58:36 CET 2017

Hi all,

I'm currently using ft_timelockstatistics to compute the group-level statistical difference between 2 granger causality spectra (I'm substituting freq for time data).

My question is whether my current cfg settings for ft_timelockstatistics (see code below) will cluster my data over time? I assume by selecting cfg.avgovertime = 'no' FT_STATISTICS_MONTECARLO will cluster over time rather than space.. but I just wanted to double check...

Many thanks,

Robert Seymour (Aston Brain Centre)


cfg = [];
cfg.avgovertime = 'no';
cfg.parameter   = 'avg';
cfg.method      = 'montecarlo';
cfg.statistic   = 'ft_statfun_depsamplesT';
cfg.alpha       = 0.05;
cfg.clusteralpha = 0.05;
cfg.correctm    = 'cluster';
cfg.numrandomization = 1000;

Nsub = numel(grandavgA);
cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];
cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];
cfg.ivar                = 1; % the 1st row in cfg.design contains the independent variable
cfg.uvar                = 2; % the 2nd row in cfg.design contains the subject number

stat = ft_timelockstatistics(cfg,grandavgB{:},grandavgA{:});

figure; plot(stat.stat); xlabel('Freq (Hz)'); ylabel('t-value');
figure; plot(stat.prob);xlabel('Freq (Hz)'); ylabel('p-value');

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170316/2c05d5c5/attachment-0001.html>

More information about the fieldtrip mailing list