<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 Giovanna,
<div class=""><br class="">
</div>
<div class="">w.r.t. 1: yes, the convention is that i goes to j.</div>
<div class=""><br class="">
</div>
<div class="">w.r.t. 2: it seems that you performed the spectral factorisation on the 17 multivariate time series simultaneously. If there is a strong linear/instantaneous dependence between the individual time series (i.e. the EEG channels between themselves),
 it could be that the factorisation does not converge to a desired result, or it could be that the computation of the PDC breaks down (it requires a matrix inversion of the NxN transfer matrices, which are expected to be numerically well-conditioned). However,
 in either case I would expect some warnings thrown by matlab, but I am not entirely sure about that.</div>
<div class=""><br class="">
</div>
<div class="">I would assume that you are primarily interested in the interaction between the EEG on the one hand, and the thalamus LFP signal on the other hand. Interpretation of the between EEG electrodes connectivity does not make much sense to begin with.
 To get a better idea of what’s going on, I would suggest 1): to use Granger causality as connectivity metric, and/because 2) it can be computed in a pairwise fashion (i.e. using a pairwise factorisation). The latter can be achieved by specifying cfg.granger.sfmethod
 = ‘bivariate’, and with an additional cfg.channelcmb you can define the pairs of channels between which you wish to compute the connectivity.</div>
<div class=""><br class="">
</div>
<div class="">Good luck,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 18 Apr 2023, at 11:37, Aiello Giovanna via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">Good morning,</span></div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
I am interested in understanding the directed connectivity between the thalamus, where I am recording a Local Field Potential (in 1 channel) and the cortex, where I am recording EEGs (in 16 channels).</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
My signal is epoched in 4-seconds windows, and I am<span class="Apple-converted-space"> </span><b class="">not<span class="Apple-converted-space"> </span></b>interested in understanding the evolution of the directed connectivity<span class="Apple-converted-space"> </span><i class=""><b class="">in
 time</b></i><span class=""><b class=""> </b>but rather just which structure is leading which.</span></div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<span class=""><br class="">
</span></div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<span class=""><br class="">
</span></div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
I have computed<span class="Apple-converted-space"> </span><b class="">Partial Directed Connectivity<span class="Apple-converted-space"> </span></b>(pdc) with the fieldtrip function<span class="Apple-converted-space"> </span><b class="">ft_connectivityanalysis</b>,
 feeding into the code the transformed, Fourier spectrum (complex double) of my signal (rpttap x channels x frequencies, where rpttap is repetitions (i.e., number of epochs) x tapers). </div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
My final matrix of pdc is<span class="Apple-converted-space"> </span><b class="">17 x 17 x frequencies<span class="Apple-converted-space"> </span></b>(where frequencies are my frequencies of interest). The first<span class="Apple-converted-space"> </span><b class="">16
 channels</b><span class="Apple-converted-space"> </span>represent the<span class="Apple-converted-space"> </span><b class="">EEG</b><span class="Apple-converted-space"> </span>channels, the<span class="Apple-converted-space"> </span><b class="">17th channel</b><span class="Apple-converted-space"> </span>is
 the<span class="Apple-converted-space"> </span><b class="">LFP</b><span class="Apple-converted-space"> </span>channel in the<span class="Apple-converted-space"> </span><b class="">thalamus</b>. Let’s call this matrix<b class=""><span class="Apple-converted-space"> </span>A.</b></div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
I have two questions:</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
1) Did I understand correctly that the element<span class="Apple-converted-space"> </span><b class="">A( i, j, f )<span class="Apple-converted-space"> </span></b>for a given frequency f indicates the directed connectivity<span class="Apple-converted-space"> </span><b class=""><u class="">from</u><span class="Apple-converted-space"> </span>element
 i<span class="Apple-converted-space"> </span><u class="">to</u><span class="Apple-converted-space"> </span>element j?<span class="Apple-converted-space"> </span></b>(And not the other way around)</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
2) In my case,<span class="Apple-converted-space"> </span><b class="">A( 1:16 , j  , f )<span class="Apple-converted-space"> </span></b>is a column vector containing the<span class="Apple-converted-space"> </span><b class="">same number!</b> </div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
It looks like, independently on what EEG channel I am considering (unless I am considering the channel in the thalamus), the contribution of directed connectivity to a certain channel<span class="Apple-converted-space"> </span><b class="">j</b><span class="Apple-converted-space"> </span>is
 always the same. This also stays for the thalamus, so if I take<span class="Apple-converted-space"> </span><b class="">A( 1:16, 17, f )</b>, it seems like all the eeg channels have the same directed connectivity to the thalamus. Is that possible? I think it
 does not really make sense. Please notice that the numbers are not exactly the same, but differ in the 4th decimal digit. </div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
<br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
Thank you in advance for your help</div>
<div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;">
Giovanna</div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div id="Signature" class="">
<div id="divtagdefaultwrapper" dir="ltr" class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
</div>
</div>
_______________________________________________<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="">
<a href="https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7wy2KyOY2SHM-e0-qSbnYbpCULn7Nw2m7tWvqb7WG3cvt7MBUpOoZKAKsYteUjCDjbjZKKHBqFuacZs_deBffx4H_DufC_UzXg4RBw$" class="">https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!7wy2KyOY2SHM-e0-qSbnYbpCULn7Nw2m7tWvqb7WG3cvt7MBUpOoZKAKsYteUjCDjbjZKKHBqFuacZs_deBffx4H_DufC_UzXg4RBw$</a></div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>