[FieldTrip] Error using indepsamplesZcoh function for calculating coherence differences

Bushra Riaz Syeda bushra.riaz at gu.se
Fri May 14 13:36:47 CEST 2021


Hello,
I am trying to do the analysis based on the paper "nonparametric statistical testing of coherence differences" in fieldtrip for comparing differences between two conditions on single subject level.

I am using the following code


cfg            = [];

cfg.method = 'montecarlo';

cfg.statistic = 'indepsamplesZcoh';

cfg.design(1,1:148)=1;

cfg.design(1,149:296)=2;

cfg.numrandomization = 1000;

cfg.correctm         = 'cluster';

cfg.neighbours=[];

cfg.parameter='crsspctrm';

cfg.alpha            = 0.05;

cfg.clusteralpha     = 0.05;

stat=ft_freqstatistics(cfg,freq_coh);


Where freq_coh is calculated as

cfg            = [];

cfg.output     = 'powandcsd';

cfg.method     = 'mtmfft';

cfg.foilim     = [1 40];

cfg.tapsmofrq  = 2;

cfg.pad = 'nextpow2';

cfg.keeptrials = 'yes';

freq_coh          = ft_freqanalysis(cfg, Coh_data);


I am getting the following error


Error using ft_statistics_montecarlo (line 250)
could not determine the parametric critical value for clustering

Error in ft_freqstatistics (line 194)
  [stat, cfg] = statmethod(cfg, dat, design);

Sample data can be found at the following link
https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0
[https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-unknown-large.png]<https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0>
Coh_data.mat<https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0>
Shared with Dropbox
www.dropbox.com

any help would be highly appreciated
Kind regards
Bushra Riaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210514/4799a788/attachment.htm>


More information about the fieldtrip mailing list