[FieldTrip] Sign/directionality of phase-slope index
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Wed Sep 8 09:00:29 CEST 2021
Dear Aliette,
Well spotted! The good thing about the discrepancy, is that one of the interpretations is correct at least.
Have you thought of trying to run a small simulation, to resolve the issue? In general I’d recommend that: ‘When in doubt, simulate’
So, I wrote a little matlab script, posted below, which should allow you to resolve the issue for yourself:
clear all;
% simulate some data
fsample = 1000;
nsample = fsample*30;
dat = randn(1,nsample+100);
data.trial{1}(1,:) = dat(1,1:nsample) + 0.1.*randn(1,nsample);
data.trial{1}(2,:) = dat(1,100+(1:nsample)) + 0.1.*randn(1,nsample);
data.time{1} = (1:nsample)./fsample;
data.label = {'a';'b'}; % channel 2 is leading channel 1
figure;plot(data.time{1},data.trial{1}); xlim([0 1]);
% cut into 2 second snippets
cfg = [];
cfg.length = 2;
data = ft_redefinetrial(cfg, data);
% spectral decomposition
cfg = [];
cfg.method = 'mtmfft';
cfg.output = 'fourier';
cfg.tapsmofrq = 2;
cfg.foilim = [0 100];
freq = ft_freqanalysis(cfg, data);
% connectivity estimation
cfg = [];
cfg.method = 'psi';
cfg.bandwidth = 5;
psi = ft_connectivityanalysis(cfg, freq);
% visualization
cfg = [];
cfg.parameter = 'psispctrm';
ft_connectivityplot(cfg, psi);
So, I think that this should help you on the way. Could I ask you, once you have resolved the discrepancy for yourself, to indicate whether the function’s documentation needs to be changed. Also, the above code might be a good example to document on the fieldtrip website, under Frequently Asked Questions. Feel free and welcome to draft a little piece of documentation that we can upload as a new FAQ!
Best wishes,
Jan-Mathijs
On 7 Sep 2021, at 22:04, Aliette Tia via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
Dear all,
For our experiment, we recorded EEG activity during presentation of visual stimuli and we would like to quantify causal influences between brain regions using the phase-slope index. I was a bit confused about the sign of PSI and the temporal precedence it indicates.
In the help documentation, I saw that :
"If the phase slope index is positive, then the first
% chan (1st dim) becomes more lagged (or less leading) with higher frequency,
% indicating that it is causally driven by the second channel (2nd dim)."
https://github.com/fieldtrip/fieldtrip/blob/master/connectivity/ft_connectivity_psi.m<https://urldefense.com/v3/__https://github.com/fieldtrip/fieldtrip/blob/master/connectivity/ft_connectivity_psi.m__;!!HJOPV4FYYWzcc1jazlU!r7BR-KkIAcwOyc5h-yUay_8wJgVtT38ax3E52E_lOa_jC160_bE7kgq2yqsMgeXlhowhvY3pXeQpA-Q$>
But I read the opposite in previous discussions:
https://mailman.science.ru.nl/pipermail/fieldtrip/2019-May/038879.html
If I understood correctly, this means that when PSI is positive, the first channel (1st dim) should lead in time the second channel (2nd dim).
Could you let me know which is the correct one?
Many thanks in advance!
Best wishes,
Aliette
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!r7BR-KkIAcwOyc5h-yUay_8wJgVtT38ax3E52E_lOa_jC160_bE7kgq2yqsMgeXlhowhvY3pl9v3grI$
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210908/c3038622/attachment.htm>
More information about the fieldtrip
mailing list