[FieldTrip] Between-Trial Stats on Coherence
Natalia Grion
grion at sissa.it
Fri Oct 21 01:43:32 CEST 2011
Dear All,
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?
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);
More information about the fieldtrip
mailing list