# [FieldTrip] Sign/directionality of phase-slope index

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Mon Sep 20 14:22:38 CEST 2021

```Hi all,

I have written a small piece of documentation that can be referred to about this topic (https://www.fieldtriptoolbox.org/faq/how_to_interpret_the_sign_of_the_phase_slope_index/), and I have updated the help documentation of ft_connectivity_psi so that it reflects the correct order of things, thus making the universe a tiny bit more balanced again.

Best wishes,
Jan-Mathijs

On 8 Sep 2021, at 09:00, Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

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?
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\$

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!rHweXsESQ15qY5nccOfhqrGo3qOaVz5FIuIyrPiYTaOFs2XGkiVW_A59-GTobX_NNZ7lSnp_QPbJIrc\$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210920/f5033348/attachment.htm>
```