[FieldTrip] Coherency cluster analysis between groups - trouble with label field and finecluster
Paul Dhami
pdhami06 at gmail.com
Mon Oct 1 03:58:21 CEST 2018
Dear FieldTrip community,
I am attempting to do a between group comparison of coherency values from
one reference channel to all other remaining 59 EEG channels.
For thoroughness, below is my call to freqanalysis for one participant's
data:
cfg = [];
cfg.output = 'powandcsd';
cfg.method = 'mtmconvol';
cfg.foi = 2:1:40;
cfg.t_ftimwin = 2 ./ cfg.foi;
cfg.tapsmofrq = 0.4 *cfg.foi;
cfg.toi = -0.4:0.01:0.4;
dataSPfreq_coh = ft_freqanalysis(cfg, dataSPfreq_coh);
and then for my call to connectivity analysis:
cfg = [] ;
cfg.method = 'coh';
cfg.complex = 'absimag';
mycoh = ft_connectivityanalysis(cfg, dataSPfreq_coh)
In an attempt to reduce the pairs in 'labelcmb', I then replaced it with
only those pairs of electrodes I was interested in (e.g. F3 and its 59
available pairings with all other electrodes), as well as changed the first
dimension of cohspctrm (electrode pairs) to include only those of interest
(thus reducing it to 59 x 39 x 81 chncmb_freq_time dimord).
I then attempted to apply freqstatistics, by first defining my neighbours
which seems fine, and then creating the follow cfg:
cfg = [];
cfg.neighbours = neighbours; % defined as above
%cfg.channelcmb = {'F3', 'FCZ'}
cfg.parameter = 'cohspctrm';
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_indepsamplesT';
cfg.correcttail = 'alpha';
cfg.correctm = 'cluster';
cfg.numrandomization = 100; % just for testing purposes
cfg.minnbchan = 2;
%cfg.latency = mylatency; % latency of interest
cfg.spmversion = 'spm12';
I then ran into the error of a 'Reference to non-existent field 'label', an
error that no longer appeared once I specified the neighbours information.
However, I then into in errors:
Error using findcluster (line 50)
invalid dimension of spatdimneighbstructmat
Error in clusterstat (line 201)
posclusobs = findcluster(reshape(postailobs,
[cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
Error in ft_statistics_montecarlo (line 352)
[stat, cfg] = clusterstat(cfg, statrand, statobs);
Error in ft_freqstatistics (line 190)
[stat, cfg] = statmethod(cfg, dat, design);
I had primarily two questions:
1) Going through the findcluster document, is it right to say that this
error is related to my editing the chncmbs and the cohspctrm which
conflicts with the neighbour I specified.
2) Is the overall pipeline even correct for attempting to do a between
groups coherence values analysis?
Any help would be greatly appreciated.
Best,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180930/a82d755f/attachment-0001.html>
More information about the fieldtrip
mailing list