<div dir="ltr">Hi,<div><br></div><div>Diagonal entries need not be zeros in MVAR, there might be nonzero autoregressive coefficients.</div><div><br></div><div>Best regards,</div><div>Lasha Ephremidze</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 8, 2022 at 7:28 PM Ioana Susnoschi-Luca (PGR) via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg8026314259250584186">




<div dir="ltr">
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)"><span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Hello!</span></span></span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">I am working on effective connectivity analysis with DTF and I am confused about the main
 diagonal elements - I expected my resulting DTF spectrum to have zero on the main diagonal, but this is not the case. Does it output the power spectrum of the fitted MVAR model instead? </span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">I would appreciate any insight into why this happens/if my thinking is correct. I reproduced
 my analysis steps (pretty much the same as FT connectivity tutorials) and rationale for diagonal values.</span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Intuitively, DTF calculates the ratio between inflows from channel j -> i, and all inflows
 to i, hence I expected i->i to be zero. It uses the transfer matrix output from mvar frequency analysis, but the transf matrix i to i looks like the MVAR model's autospectrum for channel i, so I supposed the diagonal is a ratio between autospectra and sum
 of inflows to each channel. </span></div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
</span></div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">
Thank you,</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">
Ina</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">
%% CODE</div>
<div style="font-size:12pt;margin:0px;background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-size:15px;margin:0px;color:rgb(36,36,36);background-color:rgb(255,255,255)">
<span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">% fit MVAR
<div style="margin:0px">cfg        <span> </span><span style="margin:0px">   </span>= [];</div>
<div style="margin:0px">cfg.order  <span style="margin:0px"> </span><span> </span>= 19;</div>
<div style="margin:0px">cfg.method  = 'bsmart';</div>
<div style="margin:0px">cfg.demean  = 'yes';</div>
<div style="margin:0px">cfg.zscore    = 'yes';</div>
<div style="margin:0px">mvar_data   = ft_mvaranalysis(cfg, source_ts);</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">% frequency analysis MVAR</div>
<div style="margin:0px">cfg         = [];</div>
<div style="margin:0px">cfg.method  = 'mvar';</div>
<div style="margin:0px">mfreq       = ft_freqanalysis(cfg, mvar_data);</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">% DTF spectrum</div>
<div style="margin:0px">cfg         = [];</div>
<div style="margin:0px">cfg.method  = 'dtf';</div>
<div style="margin:0px">dtf         = ft_connectivityanalysis(cfg, mfreq);</div>
<div style="margin:0px"><br>
</div>
dtfPre_dir  = dtf.dtfspctrm;</span></div>
<br>
</span></div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=1ZP2y_-rhJRJWZpQyWZyCA&m=TBkuckNveyTw6Rp5Pmoyjz4D3sJkUG5ezPs_y3M7HK7M1hfMti5V42BlyQ8ues9r&s=xXCI2nY4eF9uCG2oxuO81oL6926kgkrQL2UXbaoJdZs&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__mailman.science.ru.nl_mailman_listinfo_fieldtrip&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=1ZP2y_-rhJRJWZpQyWZyCA&m=TBkuckNveyTw6Rp5Pmoyjz4D3sJkUG5ezPs_y3M7HK7M1hfMti5V42BlyQ8ues9r&s=xXCI2nY4eF9uCG2oxuO81oL6926kgkrQL2UXbaoJdZs&e=</a> <br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__doi.org_10.1371_journal.pcbi.1002202&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=1ZP2y_-rhJRJWZpQyWZyCA&m=TBkuckNveyTw6Rp5Pmoyjz4D3sJkUG5ezPs_y3M7HK7M1hfMti5V42BlyQ8ues9r&s=fWiisGuhK0uhIHBl1nFZLhpyqjT5ic4HUnUSwQVw_Jc&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__doi.org_10.1371_journal.pcbi.1002202&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=1ZP2y_-rhJRJWZpQyWZyCA&m=TBkuckNveyTw6Rp5Pmoyjz4D3sJkUG5ezPs_y3M7HK7M1hfMti5V42BlyQ8ues9r&s=fWiisGuhK0uhIHBl1nFZLhpyqjT5ic4HUnUSwQVw_Jc&e=</a> <br>
</div></blockquote></div>