[FieldTrip] Coherency cluster analysis between groups - trouble with label field and finecluster

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Mon Oct 8 09:04:37 CEST 2018


Hi Paul,

Currently, it’s not possible to use ft_freqstatistics for statistical inference of coherence in an all-by-all channel pair fashion.
The reason is that clustering in 4D space is not implemented.
What is possible, though, is to compare coherence across conditions between all channels, and a separate reference channel (e.g. EMG). This will probably require some tweaks to the input data (e.g. replace ‘labelcmb’, with ‘label’, and replace ‘dimord’ with ‘chan_freq’). Using one of the EEG channels as a ‘reference’ should be in principle possible as well (at least in terms of algorithm, whether interpretations based on inferential decisions make sense in this case, that’s up to the user).

Best wishes,
Jan-Mathijs



On 7 Oct 2018, at 13:52, Paul Dhami <pdhami06 at gmail.com<mailto:pdhami06 at gmail.com>> wrote:

Dear FieldTrip community,

sorry for sending another email out, but I am still having trouble with this issue. 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

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181008/eaf0592b/attachment-0002.html>


More information about the fieldtrip mailing list