MVGC "chol" error

Hello**,**

I am currently trying to perform connectivity analysis using bivariate Granger causality. However, when I try to use the MVGC function, the following error message appears.

What should I do?

Best regards,
Arthur

It seems it is related to your input data.

Can you double-check there are not NaN or Inf values in it?

Hello**,**

I’ve already checked this, but it doesn’t seem to be present in my dataset..

Best regards,
Arthur

I just tried on some MEG (also tried nirs) data and got the same error.

Fitting the model using OLS, instead of LWR fit with the following warning:

model order = 10 WARNING: residuals covariance not positive definite

I guess it’s a similar error when using LWR: E*E' is not positive definite as expected from a covariance matrix.

My guess is that it’s an issue with the toolbox, not brainstorm.

Edit: I did some test. and it seems it fails when there isnt enough data to estimate the model. I guess you can try to either reduce the model order or increase the data duration (though in my case, it resulted, for MEG, in out of memory issue latter)

Edit2: i just tried the tutorial script tutorial_connectivity. It runs fine. so i guess the main issue comes from using ‘real data’ with more than 3 signals. @Raymundo.Cassani could you try on your side on real EEG or MEG data ?

Hello,

I tried to reduce the model order, but it doesn’t work either. I also tried using a longer signal duration to see if that would help, but it doesn’t work either…

As pointed by @edelaire, the issue comes from the fact that the covariance matrix is not positive definite text, this happens when data is rank deficient. It is likely that one of more of your channels are linearly dependent. On EEG this linear dependency is introduced when doing average referencing (rank is nChannels -1).

1 Like

Hello,

I'm sorry, but I don't really understand. I've tried a lot of things to fix the problem, but it still doesn't work.

My EEG reference was indeed ‘Average’, which I changed afterwards. I wanted to establish causality on evoked potentials, I don't know if that's possible in itself, but it could potentially limit the size of my data. So I tried to take my EEG from 0 to 100ms, the correlation and coherence tests work, but when I move on to causality, the same problem comes back...

I can send you the data so you can try it if you wish. My EEG has 128 channels.

Kind regards,

A

So, average reference is not a good idea when computing connectivity analysis right?