[FieldTrip] Error using indepsamplesZcoh with cluster statistics

Antony Passaro antony.passaro at gmail.com
Wed Jul 17 19:08:41 CEST 2013


Hi all,

I'm having an issue running freqstatistics using the indepsamplesZcoh and a
cluster correction. The indepsamplesZcoh portion seems to run just fine but
I get an error when I try to perform the cluster statistics. The first
issue is error1: The error describes a dimension mismatch at line 297 of
ft_statistics_montecarlo: statrand(:,:,i) = getfield(dum, 'stat');
Apparently the output (dum) from indepsamplesZcoh collapses my 100
frequencies and 100 timepoints into 10000 points (nchancmb/2 x 10000) but
the dimensions of statrand are nchancmb/2 x 100 x Nrand which obviously
creates a dimension mismatch. I can get past that part if I set avgovertime
= 'yes' which takes me to error 2: "To RESHAPE the number of elements must
not change" refers to line 202 in clusterstat.m, posclusobs =
findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
Here, cfg.dim is nchan x 100 freq x 1 (avgtime) which obviously doesn't
match postailobs dimensions of nchancmb/2 x 100.

I thought perhaps the ndepsamplesZcoh function is not supposed to be used
in conjunction with the cluster statistics but the Maris 2007 paper appears
to use the two together. Any help with this would be much appreciated.

Below is the code that that I'm using:

cfg = [];
%cfg.avgovertime = 'yes';
cfg.correctm =           'cluster';
cfg.clusteralpha =       0.05;
cfg.clusterstatistic =   'maxsum';
cfg.clusterthreshold =   'parametric';
cfg.minnbchan =          2;
cfg.correcttail =        'alpha';
cfg.method    = 'montecarlo';
cfg.statistic = 'indepsamplesZcoh';
cfg.parameter = 'fourierspctrm';
cfg.computecritval = 'yes';
cfg.neighbours =          neighbours;
cfg.numrandomization = 99;
cfg.alpha =              0.05;
cfg.tail =               0;
design = ones(1, 90); design(91:180)=2;
cfg.design =             design;
cfg.label     = freqL.label;
stat = ft_freqstatistics(cfg, freqL,freqR);


Thanks,
-Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130717/46eafb18/attachment.html>


More information about the fieldtrip mailing list