[FieldTrip] Between-Trial Stats on Coherence

Maris, E. (Eric) e.maris at psych.ru.nl
Fri Oct 28 11:52:22 CEST 2011


Hi Natalia,


> when computing the statistical test for difference in coherence
> between condition 1 and condition 2 (for single subject) I get NaNs
> for stat. The setting code is quite simple and I did some checking for
>
> silly errors(ex. I dowloaded the very last version), so either I'm
> doing sth wrong or there is a bug somwhere. Maybe you can help me.
> I do the following: having computed the 'fourier' for both conditions
>
> (diff amount of trials), I run the code for the second step  (whithout
>
> MC correction for the moment). I have 2 channel on which Im computing
>
> the coherence. The data for both conditions have the same length. The
>
> design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent
> variable. AmI missing something on the design or like reshaping the
> data?

Just as a check, can you produce coherence values with your ft_freqanalysis 
output using ft_connectivityanalysis?


Best,

Eric Maris


> Any help is welcome!
> Natalia
>
> cfg = [];
> cfg.channel ={'lfp';'Whisk'};
> cfg.channelcmb ={'lfp' 'Whisk'};
>
> cfg.frequency ='all';
> cfg.method = 'montecarlo';
> cfg.parameter ='fourierspctrm';
> cfg.statistic = 'indepsamplesZcoh';
> cfg.alpha = 0.05;
> cfg.tail = 0;
> cfg.numrandomization = 10; %500
> cfg.neighbours = [];
> %cfg.correctm =  'cluster';
> %cfg.clusterthreshold = 'nonparametric_common';
> %cfg.clusterstatistic = 'maxsum';
> %cfg.clusteralpha     = 0.05;
> %cfg.clustertail      = 0;
> %cfg.correcttail      ='prob';
>     cfg.computestat    = 'yes';
>     cfg.computecritval = 'yes';
>     cfg.computeprob    = 'yes' ;
> %Design of matrix
> design = zeros(1,size(freqoutdisc.fourierspctrm,1) +
> size(freqoutwalk.fourierspctrm,1));
> design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1;
> design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1)
> + size(freqoutwalk.fourierspctrm,1)))=
> 2;
> cfg.design   = design;
> cfg.ivar  = 1;
> [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk);
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip



More information about the fieldtrip mailing list