<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hello everyone,</p>
<p>I am Maxime Fauvet from ToNIC lab in Toulouse, France, currently working on functional connectivity between brain and muscles during movement through corticomuscular coherence analyses of EEG and EMG signals. I am trying to perform a granger causality (GC) analysis from those signals but somehow I cannot achieve to get a complete time-frequency map of the GC.</p>
<p>I used ft_freqanalysis with the following raw data and cfg:</p>
<p>cfg.method: ‘wavelet’<br />cfg.output: ‘powandcsq’<br />cfg.foi: 1:1:50<br />cfg.pad: 1000</p>
<p>raw data: 2 matrices of 17 trials and 3 seconds sampled at 1KHz, one for EEG and the other for EMG signals, structured as required in ft_freqanalysis</p>
<p>After removing NaNs from powerspectrum and crosspowerspectrum, and setting cfg.method: ‘granger’, I used ft_connectivityanalysis with the cfg and freq (issued from ft_freqanalysis) arguments.</p>
<p>However, I receive the following warning message many times:</p>
<p>Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. <br />>In sfactorization_wilson (line 187)<br /> In ft_connectivity_csd2tranfer (line 267)<br /> In ft_connectivityanalyis (line 464)</p>
<p>The issue appears to come from the matrix factorization function and more precisely from the chol function, a Matlab core function. Interestingly, some points of the time series do not trigger the warning message.</p>
<p>Can someone tell me if anything is wrong with the use of ft_connectivityanalysis (either in cfg or data)? Any help would be appreciated.</p>
<p>Best wishes,</p>
<p>Maxime</p>
<p> </p>
<div> </div>
</body></html>