<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Masoud et al.,
<div class=""><br class="">
</div>
<div class="">Apologies: I was inaccurate in my previous e-mail in explaining the GC coefficient. It’s the
<u class="">negative</u> natural logarithm of the residual variance ratio, where the model with the larger number of parameters (i.e. the one which predicts a signal based on the past of the other signals as well) is in the numerator. </div>
<div class=""><br class="">
</div>
<div class="">BW,</div>
<div class="">JM</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">Begin forwarded message:</div>
<br class="Apple-interchange-newline">
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Jan Mathijs Schoffelen <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" class="">janmathijs.schoffelen@donders.ru.nl</a>><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Re: [FieldTrip] A question about connectivity values</b><br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">4 January 2023 at 13:25:18 CET<br class="">
</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class="">
<span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To:
</b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>><br class="">
</span></div>
<br class="">
<div class="">
<div class="">Hi Masoud,<br class="">
<br class="">
Theoretically, the Granger causality coefficient is a natural logarithm of a ratio of residual variances, where this ratio is typically >1, because the model implicitly used for the numerator has more parameters, so typically a lower residual variance. In other
 words, GC > 0 but can become larger than 1. <br class="">
<br class="">
If the input data into the algorithm are numerically not well behaved, I can imagine that the output GC will be unexpected. In your case, you estimate a series of models consisting of 62x62x6 (i.e. >18.000) parameters (for each time window). If the number of
 samples in your data is insufficient and/or there’s linear dependence between channels, the estimated parameters, and by consequence the spectral quantities, and the GC will not make sense.<br class="">
<br class="">
Best wishes and good luck,<br class="">
<br class="">
Jan-Mathijs<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<blockquote type="cite" class="">On 4 Jan 2023, at 09:26, masoud via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:<br class="">
<br class="">
Hello dear fieldtrip community<br class="">
I have been using fieldtrip for quite some time and now I am dealing with dynamic connectivity, the preprocessing of the data which I am using was done in fieldtrip as well as MVAR analysis, this is the code for calculating dynamic connectivity:<br class="">
   cfg.method = 'biosig';<br class="">
   cfg.t_ftimwin = 5;<br class="">
   cfg.toi = toi;<br class="">
   cfg.order = 6;<br class="">
   cfg.output = 'parameters';<br class="">
   mvardata = ft_mvaranalysis(cfg, data);<br class="">
   cfg = [];<br class="">
   cfg.method = 'mvar';<br class="">
   cfg.output = 'fourier';<br class="">
   freq = ft_freqanalysis(cfg, mvardata);<br class="">
   cfg = [];<br class="">
   cfg.method = 'granger';<br class="">
   stat = ft_connectivityanalysis(cfg, freq);<br class="">
so the output of connectivity (stat) is a 4-d matrix(channel, channel, frequency, windows) which for my data is (62, 62, 126, 12)<br class="">
the values of the channel x channel are mostly negative like -13.2650 , -5.7060 or between -1 and 1.
<br class="">
as my understanding the output should be between 0 and 1. So where am I doing it wrong? And if I change the method from 'granger' to 'pdc' or 'dtf' what should be the range of output?
<br class="">
thank you so much in advance <br class="">
best regards<br class="">
Masoud<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_A7iaW2bTmQVqTwzWp2CiqVYS7OUDPsHcVqbD8h4gfg9PVZjhzf7b4hCe3x8u5eqEe-Y7lb48cayVioAe8K0M9KMxEvk9Oz5pNDoEA$
<br class="">
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>