# [FieldTrip] Non-Parametric Conditional Granger Causality

Per Arnold Lysne lysne at unm.edu
Tue Jun 10 18:58:31 CEST 2014

```Hi Jan-Mathijs,

Thank you for the quick response and for pointing out my problem with scaling the y-axis. Your suggestion pointed be to another issue: while the Granger spectra output from the non-conditional calculation is organized as 3x3xNFreqs (for a trivariate system),  the conditional Granger output is a flat list of 6xNFreqs. I am now getting the correct, frequency resolved results in both cases. I will attach my code in case it can be of help in the future.

If there is a convenient reference for the calculation in blockwise_conditionalgranger.m, I would still be interested in seeing it.

Thanks again,

-Per

________________________________
From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of jan-mathijs schoffelen <jan.schoffelen at donders.ru.nl>
Sent: Tuesday, June 10, 2014 2:15 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Non-Parametric Conditional Granger Causality

Dear Per,

Thanks for sending along the very clear code, makes it easy to run and verify ;-).
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.

Best wishes,
Jan-Mathijs

On Jun 9, 2014, at 10:04 PM, Per Arnold Lysne <lysne at unm.edu<mailto:lysne at unm.edu>> wrote:

Hello,

I am trying to use non-parametric Granger spectral decomposition on a simple, artificial MVAR system:

x(t) = 0.80*x(t-1) - 0.50*x(t-2) + 0.40*z(t-1)
y(t) = 0.53*y(t-1) - 0.80*y(t-2)
z(t) = 0.50*z(t-1) - 0.20*z(t-2) + 0.50*y(t-1)

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).

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.

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.

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).

Per A. Lysne
University of New Mexico
lysne at unm.edu<mailto:lysne at unm.edu>

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.

<MVAR2.Spectra.jpg>
<MVAR2.NonCondGranger.jpg><MVAR2.CondGranger.jpg>
<pal_test_ft_granger_cond.m>_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD

Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl<mailto:J.Schoffelen at donders.ru.nl>
Telephone: +31-24-3614793

http://www.hettaligebrein.nl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140610/83b14fc0/attachment-0002.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pal_test_ft_granger_cond.m
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140610/83b14fc0/attachment-0002.ksh>
```