<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Dear Per,<div><br></div><div>Thanks for sending along the very clear code, makes it easy to run and verify ;-).</div><div>I think that it went quite OK. Using conditional Granger in this example would hopefully leading to the conclusion Z is Granger-causing X and Y is Granger-causing Z. Your fourier_granger variable (with conditioning) shows just that. The thing is, that the magnitude for some reason are much larger than the y-axis scale you chose for visualization. If you do a plot(fourier_granger.freq, fourier_granger.grangerspctrm), you’ll see that there are 2 lines that show non-zero values.</div><div><br></div><div>Best wishes,</div><div>Jan-Mathijs</div><div><br><div><div><div>On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne <<a href="mailto:lysne@unm.edu">lysne@unm.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div id="OWAFontStyleDivID" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">Hello,</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system:</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1)</div><div style="margin-top: 0px; margin-bottom: 0px;">y(t) = 0.53*y(t-1) - 0.80*y(t-2)</div><div style="margin-top: 0px; margin-bottom: 0px;">z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1)</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    This example system is drawn from Dhamala, Rangarajan, & Ding, 2008, NeuroImage, where is it used to demonstrate "prima facie", or erroneous conclusions about causality when the conditional decomposition is not used (i.e. in the system itself y->z->x, but an additional link y->x is seen when the non-conditional granger calculation is used).</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    In my code and output included below, the Fourier power and non-conditional Granger output are as expected, but the conditional Granger output appears to be uniformly near zero.</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    The only difference between the two cases in my code is the setting of a single parameter passed to ft_connectivityanalsysis, cfg.granger.conditional being 'no' and 'yes' in the respective cases.</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    My apologies if I have missed an archived post addressing this issue, as this is quite likely to be an error on my part. Alternatively, I do not recognize the calculation being performed in blockwise_conditionalgranger.m. If someone has a reference to this, I may be able to figure this out myself (I am working from Chen, Bressler, & Ding, 2006, "Frequency decomposition of conditional Granger causality and application to multivariate neural field potential data", Journal of Neuroscience Methods).</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">    Thank you for your help,</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">Per A. Lysne</div><div style="margin-top: 0px; margin-bottom: 0px;">University of New Mexico</div><div style="margin-top: 0px; margin-bottom: 0px;"><a href="mailto:lysne@unm.edu">lysne@unm.edu</a></div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><p style="margin-top: 0px; margin-bottom: 0px;"> </p><p style="margin-top: 0px; margin-bottom: 0px;"> </p><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;">The first image is the Fourier power spectra of the system (abs applied to complex-valued cross-power). The second image is the non-conditional Granger decomposition, and the third image the conditional Granger. My convention for plotting is "row-causes-column". Results are generated using 100 trials of 300 samples apiece with an assumed sampling frequency of 200 Hz. Software is Matlab R2012a, Student Edition, and my Fieldtrip download is dated 6/3/2014. The code which generated these images is attached.</div><p style="margin-top: 0px; margin-bottom: 0px;"> </p><p style="margin-top: 0px; margin-bottom: 0px;"> </p><div style="margin-top: 0px; margin-bottom: 0px;"><span><MVAR2.Spectra.jpg></span></div><div style="margin-top: 0px; margin-bottom: 0px;"><span><MVAR2.NonCondGranger.jpg></span><span><MVAR2.CondGranger.jpg></span></div></div><span><pal_test_ft_granger_cond.m></span>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div></body></html>