[FieldTrip] RE : Unexpectedly high coherence measure

Eva Masson eva.masson at hotmail.fr
Tue Oct 12 09:49:08 CEST 2021


Hi Jan-Mathijs,

Thanks for your response. I have tried your suggestions, but unfortunately the outcome does not change, as the resulting coherence is still unusually high (and that is, for sure, erroneous).

If the method presented in the tutorial is difficult for a low number of trials, do you know of a better one using FieldTrip ? And, just to be sure I understood the code correctly, what is actually computed as coherence is the magnitude squared coherence (cross-spectrum over auto-spectrum), right ?

Thanks a lot !
Best wishes,
Eva


De : Schoffelen, J.M. (Jan Mathijs) via fieldtrip<mailto:fieldtrip at science.ru.nl>
Envoyé le :mardi 12 octobre 2021 08:35
À : FieldTrip discussion list<mailto:fieldtrip at science.ru.nl>
Cc : Schoffelen, J.M. (Jan Mathijs)<mailto:janmathijs.schoffelen at donders.ru.nl>
Objet :Re: [FieldTrip] Unexpectedly high coherence measure

Hi Eva,

I don’t know the algorithmic details of the ‘reference’ approaches’, but:

1) cfg.foi = [1 60] will give you only 2 frequency bins in the output of ft_freqanalysis (with method = ‘mvar’). The mvar method requires a vector of frequency bins.
2) 9 segments is really not a lot for a coherence estimate: In the limit of a single segment the coherence goes to 1

I’d start with changing the cfg.foi into [0:60], (or omitting it altogether) and see what happens.

Best wishes,
Jan-Mathijs



On 11 Oct 2021, at 23:02, Eva Masson via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi FieldTrippers !

I am currently implementing a script for computing coherence (and Granger causality, but that’s another topic) measure of iEEG data.

I am aware of two different paths in doing so: the parametric and non parametric approaches. As I am still at the early stages of the method, I am using data that was already tested for coherence in another software as reference and performing the coherence-related steps in FieldTrip, based on the following tutorial :
https://www.fieldtriptoolbox.org/tutorial/connectivity/<https://urldefense.com/v3/__https:/www.fieldtriptoolbox.org/tutorial/connectivity/__;!!HJOPV4FYYWzcc1jazlU!qleIR_V3gd0VSeD0kXBxAdiFSlnXmwyrdQCjLUq3kr7Q84KsrWkhIzKdJU_UtL22aaj_LXrrtwTxbCw$>

To summarize, I want to compute the coherence between electrodes X and Y for each frequency from 0 to 60 Hz. The input data consists in 9 segments of 300ms each after preprocessing, fsample 256.0164 Hz.
The problem is in the coherence measure I compute. The output of the following script is an unexpectedly high coherence measure, sometimes up to 0.9 when there is supposedly no to little coherence as compared to the « reference » measure on the other software. However, after searching through the FieldTrip functions code, the way of measuring the coherence seems to be the same (using the cross and auto Spectrum).

I am very most likely missing a step or a parameter in my script, but I have no clue what it is, where it is, and what I am misunderstanding.

Please find here a simplified version of my code for the parametric way of computing coherence.

% Compute mvar
cfg = [];
cfg.order = 12; % here I have tried different model orders and the problem persists
cfg.toolbox = 'bsmart';
cfg.channel = {‘X’ ‘Y’};
mvar_data = ft_mvaranalysis(cfg, data);

% Passage fréquence
cfg = [];
cfg.method = 'mvar';
cfg.foi = [1 60];
mvar_freq = ft_freqanalysis(cfg, mvar_data);

% Optionnel : cohérence
cfg = [];
cfg.method = 'coh';
mvar_coh = ft_connectivityanalysis(cfg, mvar_freq);

Do you know what is wrong with this ? I would be very thankful if you could help me on this 😊
Thanks a lot !

Cheers !
Eva
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qleIR_V3gd0VSeD0kXBxAdiFSlnXmwyrdQCjLUq3kr7Q84KsrWkhIzKdJU_UtL22aaj_LXrriM-uq7Q$<https://urldefense.com/v3/__https:/doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!qleIR_V3gd0VSeD0kXBxAdiFSlnXmwyrdQCjLUq3kr7Q84KsrWkhIzKdJU_UtL22aaj_LXrriM-uq7Q$>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211012/9d6509c3/attachment.htm>


More information about the fieldtrip mailing list