<div dir="auto"><div dir="auto">Thank you for the clarification, that was very helpful<div dir="auto">Best regards</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 4, 2023, 4:11 PM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" rel="noreferrer">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word;line-break:after-white-space">
Hi Masoud et al.,
<div><br>
</div>
<div>Apologies: I was inaccurate in my previous e-mail in explaining the GC coefficient. It’s the
<u>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><br>
</div>
<div>BW,</div>
<div>JM</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>Begin forwarded message:</div>
<br>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>From:
</b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">Jan Mathijs Schoffelen <<a href="mailto:janmathijs.schoffelen@donders.ru.nl" rel="noreferrer noreferrer" target="_blank">janmathijs.schoffelen@donders.ru.nl</a>><br>
</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>Subject:
</b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif"><b>Re: [FieldTrip] A question about connectivity values</b><br>
</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>Date:
</b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">4 January 2023 at 13:25:18 CET<br>
</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif;color:rgba(0,0,0,1.0)"><b>To:
</b></span><span style="font-family:-webkit-system-font,Helvetica Neue,Helvetica,sans-serif">FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" rel="noreferrer noreferrer" target="_blank">fieldtrip@science.ru.nl</a>><br>
</span></div>
<br>
<div>
<div>Hi Masoud,<br>
<br>
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>
<br>
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>
<br>
Best wishes and good luck,<br>
<br>
Jan-Mathijs<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<blockquote type="cite">On 4 Jan 2023, at 09:26, masoud via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" rel="noreferrer noreferrer" target="_blank">fieldtrip@science.ru.nl</a>> wrote:<br>
<br>
Hello dear fieldtrip community<br>
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>
   cfg.method = 'biosig';<br>
   cfg.t_ftimwin = 5;<br>
   cfg.toi = toi;<br>
   cfg.order = 6;<br>
   cfg.output = 'parameters';<br>
   mvardata = ft_mvaranalysis(cfg, data);<br>
   cfg = [];<br>
   cfg.method = 'mvar';<br>
   cfg.output = 'fourier';<br>
   freq = ft_freqanalysis(cfg, mvardata);<br>
   cfg = [];<br>
   cfg.method = 'granger';<br>
   stat = ft_connectivityanalysis(cfg, freq);<br>
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>
the values of the channel x channel are mostly negative like -13.2650 , -5.7060 or between -1 and 1.
<br>
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>
thank you so much in advance <br>
best regards<br>
Masoud<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_A7iaW2bTmQVqTwzWp2CiqVYS7OUDPsHcVqbD8h4gfg9PVZjhzf7b4hCe3x8u5eqEe-Y7lb48cayVioAe8K0M9KMxEvk9Oz5pNDoEA$" rel="noreferrer noreferrer" target="_blank">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!_A7iaW2bTmQVqTwzWp2CiqVYS7OUDPsHcVqbD8h4gfg9PVZjhzf7b4hCe3x8u5eqEe-Y7lb48cayVioAe8K0M9KMxEvk9Oz5pNDoEA$</a>
<br>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer noreferrer noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4ud_hiZefhVfO11pPlP_cDQfO9rUf5GbrQM7_8Op9GIzwEvraO1NcErg8AlFbYUjdyVT8ww58lOAG1nw-QCQgjBg4un_GV4$" rel="noreferrer noreferrer noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div></div>