[FieldTrip] Error using indepsamplesZcoh function for calculating coherence differences

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue May 18 14:05:37 CEST 2021


Hi Bushra,

Can you please specify the cfg to ft_freqstatistics as well? Otherwise, we don’t know what you did exactly.

Also, ft_freqstatistics with cfg.statistic = ’indepsamplesZcoh’ requires frequency data that has been computed with ‘fourier’ rather than ‘powandcsd’ as cfg.method for ft_freqanalysis

Best wishes,
Jan_Mathijs


On 14 May 2021, at 13:36, Bushra Riaz Syeda <bushra.riaz at gu.se<mailto:bushra.riaz at gu.se>> wrote:

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://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$>
[https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-unknown-large.png]<https://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$>

Coh_data.mat<https://urldefense.com/v3/__https://www.dropbox.com/s/6gfj97srttteawy/Coh_data.mat?dl=0__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA-cj5upg$>
Shared with Dropbox
www.dropbox.com<https://urldefense.com/v3/__http://www.dropbox.com__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA7PXFKq_$>


any help would be highly appreciated
Kind regards
Bushra Riaz
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!rzdciE12ryfrSpIQp-4LAZj3EK_9U0i1XJby6k79PqsvZKuG4jrCMN-qjHXKDzonA0G39K1J$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210518/037444dc/attachment.htm>


More information about the fieldtrip mailing list