Negative Weighted Phase Lag Index Values

We are running analyses on resting state MEG data and we are finding negative values in the weighted phase lag index (wpli) measure. We have also run this data using the phase lag index (PLI) measure and do not see any values below zero. I thought that both the PLI and WPLI should be defined from 0 to 1. Although the negative values tend to be small, we are seeing this across many subjects.

wpli=np.load('connmat_wpli2_debiased13_30hz_run1.npy')

np.min(wpli), np.max(wpli)
Out[22]: (-0.0048496421426467845, 0.14954351856205442) <<<<<<<<< WPLI minimum value below Zero

pli=np.load('connmat_pli13_30hz_run1.npy')

np.min(pli), np.max(pli)
Out[24]: (0.0, 0.21375066880684856) <<<<<<<<< PLI minimum value equals zero

Is this a correct finding? Any insight would be helpful.

Thank you,
Jeff Stout
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170614/19edcb44/attachment.html

Yes it looks like WPLI should be bounded by 0 and 1. Can you open an MNE
issue so we can look into it further?

Eric

Dear all,

I don't know the implementation in MNE, but, as far as I know, the WPLI
ranges between between -1 and 1 (see Fig. 1C in Vinck, Neuroimage 2011).
The same is for the imaginary coherence (Nolte, Clin Neurophysiol 2004).

The strength of phase-synchronization can be indexed by the magnitude
(or squared value) of the WPLI.

bye

Andrea

Le 14-Jun-17 ? 7:51 PM, Eric Larson a ?crit :

Yes it looks like WPLI should be bounded by 0 and 1. Can you open an
MNE issue so we can look into it further?

Eric

    We are running analyses on resting state MEG data and we are
    finding negative values in the weighted phase lag index (wpli)
    measure. We have also run this data using the phase lag index
    (PLI) measure and do not see any values below zero. I thought
    that both the PLI and WPLI should be defined from 0 to 1.
    Although the negative values tend to be small, we are seeing this
    across many subjects.

    wpli=np.load('connmat_wpli2_debiased13_30hz_run1.npy')

    np.min(wpli), np.max(wpli)

    Out[22]: (-0.0048496421426467845, 0.14954351856205442) <<<<<<<<<
    WPLI minimum value below Zero

    pli=np.load('connmat_pli13_30hz_run1.npy')

    np.min(pli), np.max(pli)

    Out[24]: (0.0, 0.21375066880684856) <<<<<<<<< PLI minimum value
    equals zero

    Is this a correct finding? Any insight would be helpful.

    Thank you,

    Jeff Stout

    _______________________________________________
    Mne_analysis mailing list
    Mne_analysis at nmr.mgh.harvard.edu
    <mailto:Mne_analysis at nmr.mgh.harvard.edu>
    https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
    <https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis&gt;

    The information in this e-mail is intended only for the person to
    whom it is
    addressed. If you believe this e-mail was sent to you in error and
    the e-mail
    contains patient information, please contact the Partners
    Compliance HelpLine at
    http://www.partners.org/complianceline
    <http://www.partners.org/complianceline&gt; . If the e-mail was sent
    to you in error
    but does not contain patient information, please contact the
    sender and properly
    dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170614/cf8d82c5/attachment-0001.html

Fig1C shows the individual vectors and how they're weighted -- I was
looking at Eq.8 which defines WPLI, and the paragraph that followed where
they state that 0 ? ? ? 1 holds (due to the absolute value operations in
the numerator and denominator). But maybe there is more to it or you don't
need to take the absolute value of the expectation in the numerator, in
which case it could be -1 ? ? ? 1, is that what you have in mind...?

Eric

Jeff,

When you get a chance, could you try to share some data (as small as
possible) and a small code snippet (using coherence-computing routines)
that show this problem to the related MNE issue I opened
<https://github.com/mne-tools/mne-python/issues/4319>?

Eric

Hey all,

Hopefully this helps rather than compounds your problem, but this also occurs when computing the debiased squared wpli, where there should undoubtedly be no negative values (unless the debiasing does something strange that I'm not aware of), just FYI. Generally, any negative values are small just as Jeff sees. However, out of a group of 57 subjects that I ran this on, I got a minimum value of -0.3954, which isn't all that small. I only mention this in case it is some shared routine between the wpli and wpli2_debiased that is generating these negative values. Hopefully the data you get from Jeff is enough to figure out what's going on, but I can supply more if need be.

Cheers,
Cody

this also occurs when computing the debiased squared wpli, where there
should undoubtedly be no negative values (unless the debiasing does
something strange that I'm not aware of), just FYI.

From what I recall the debiasing can indeed produce (generally small)

negative values, so that at least I would expect. From Vinck et al., 2011:

If the WPLI exceeds the PLI, then the debiased WPLI-square estimator will

be negatively biased for small sample sizes.

The WPLI, however, doesn't have this characteristic, and from what I've
seen in a brief look at the MNE code, I'm not sure where it could come from
(based on where we use abs()). So a minimal example would help us track it
down.

Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170614/1c4fad03/attachment.html

Suggestion: in Fieldtrip, the WPLI is implemented in its signed version,
it is not the eq.8 of Vinck' paper, which is bounded [0, 1].

The estimator is (line 73 in ft_connectivity_wpli.m
<https://github.com/fieldtrip/fieldtrip/blob/master/connectivity/ft_connectivity_wpli.m&gt;
):

E(Im(X))/E(|Im(X)|)

Maybe the MNE code got inspiration from it.

Andrea

Le 14-Jun-17 ? 10:48 PM, Eric Larson a ?crit :

    this also occurs when computing the debiased squared wpli, where
    there should undoubtedly be no negative values (unless the
    debiasing does something strange that I'm not aware of), just FYI.

From what I recall the debiasing can indeed produce (generally small)
negative values, so that at least I would expect. From Vinck et al., 2011:

    If the WPLI exceeds the PLI, then the debiased WPLI-square
    estimator will be negatively biased for small sample sizes.

The WPLI, however, doesn't have this characteristic, and from what
I've seen in a brief look at the MNE code, I'm not sure where it could
come from (based on where we use abs()). So a minimal example would
help us track it down.

Eric

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170615/abb7b803/attachment-0001.html

I'm not sure whether to respond here or to that Digest email that just got sent out, but Jeff appears to also be using the 'wpli2_debiased' method, according to the chunks of code that just got sent out:

" con_methods = ['coh', 'pli', 'wpli2_debiased'] "

And Eric seems to be correct that these values can indeed be negative. If you look at Fig. 12 of Vinck et. al 2011, their color mapping spans from -0.2 to 0.6, with the two bias measure (unbiased PLI2 and debased WPLI2) both appearing to reach negative values compared to the direct PLI2. So, if Jeff is truly using 'wpli2_debiased' as his method just as I am (as the code suggests), then there should be no bug.

Cheers,
Cody