<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1697341252;
        mso-list-type:hybrid;
        mso-list-template-ids:358882998 -1 67895299 67895301 67895297 67895299 67895301 67895297 67895299 67895301;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style>
</head>
<body lang="FR" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi FieldTrip Community !</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to compute spectrally resolved Granger causality on (i)EEG data using the parametric approach, with mvar modelling. At this level, it is easier for my data than non parametric modelling.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">From the original data, I have selected two channels to compute Granger causality from channel 1 to channel 2 and from channel 2 to channel 1.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am currently struggling with the last step, from which I am expecting an output in the form of a 4-D structure containing the Granger causality power for each selected frequency and each time point for :</p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Channel 1 to channel 1 (not very informative)</li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Channel 1 to channel 2</li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Channel 2 to channel 1</li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1">Channel 2 to channel 2 (not very informative)</li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To do so, I am using the function <i>ft_connectivity_granger</i>, which I think is suited for spectrally resolved Granger causality, also while keeping the time dimension.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is my sloppy code :</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i>[mvar_granger, V, n] = ft_connectivity_granger(mvar_freq.transfer, mvar_freq.noisecov, ...<o:p></o:p></i></p>
<p class="MsoNormal"><i>    mvar_freq.crsspctrm, 'dimord', 'chan_chan_freq_time');<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In which mvar_freq is the structure obtained after ft_mvaranalysis and transformed into the frequency domain with ft_freqanalysis_mvar. To be honest, I don’t know what V stands for in the output.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here are the dimords of the mvar_freq fields used as inputs:</p>
<p class="MsoNormal">Transfer (H) and crsspctrm (S): chan_chan_freq_time</p>
<p class="MsoNormal">Noisecov (Z) : chan_chan_freq</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">After running the previous line, I do not get an error, but a mvar_granger structure in 3D containing a lot of 0 values. Honestly, I don’t really understand what it represents.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If someone knows how to work with ft_connectivity_granger in such a way that I can get the kind of output I am looking for (probably something like chan_chan_freq_time, right ?), I am all ears to your wisdom !</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would be very thankful for any help on this topic <span style="font-family:"Segoe UI Emoji",sans-serif">😊</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers !</p>
<p class="MsoNormal">Eva</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">PS : Thanks a lot for this FieldTrip mailing list. I am learning so much thanks to it !</p>
</div>
</body>
</html>