Estimating Granger Causality

Thank you for using this package for Granger causality estimation --[Download V1.0 (MATLAB2008 compatible)] [Download V2.0 (MATLAB2014 compatible)]



Fig. 1. An example of Granger causality estimated from fMRI data [3].


This is a Matlab GUI for estimating Granger causatliy on time series data set. It is still under testing, so any feedback from you would be more than welcome. Free for acadamic use only. In the current working path in MatLab, the GUI is avaliable if you type in


Then the use of this toolbox should be straightforward.


Four different methods are provided to estimate Granger causality, including Conditional Granger Causality, Partial Granger Causality, spatio-temporal Granger Causality, and Granger causality with signal-dependent noise.

In spatio-temporal Granger causality (stGC), we need to specify if we want to use

1) optimal time window division on the time series to estimate the averaged GC across time windows, or

2) equal time windows with fixed window numbers or

3) no time window division.

We also need to specify the spatial resolution. For example, if we are calculating the GC between two ROIs with m and n voxles, respectively. We can specify the voxels for each ROI in the GUI and compute the GC between all pairs of voxels from two ROIs. Then, the GC between these two ROIs can be estimated by the mean GC among all paris of voxels.

In Granger causality with signal-dependent noise (GCSDN), we need to specify the model order in variance, ie. BEKK order. The frequency domain result is also avialable for GCSDN. The function for detecting the existence of SDN has also been included in this package, but it will work for time series data with repeat blocks only.


Fig. 2. A screenshot of the toolbox.


The results are shown in tables and figures. The results are also saved in 'myresult.mat' in the current working path.

For temporal GC

causMatrix(j,k) ----causality from k-th time series to j-th time series

pvalMatrix(j,k) ----p-value of estimated causality, if avaliable

TtimeCau{j,k} ----causality from k-th time series to j-th time series in each time window

For spatial GC and spatio-temporal GC

causMatrix(j,k) ----mean causality from k-th ROI to j-th ROI, which is averaged over all pairs of voxels from two ROIs

stdMatrix(j,k) ----std in the estimated causality

For conditional and partial GC

meanArray(j,k) ----mean causality from k-th time series to j-th time series given by bootstrap

varArray(j,k) ----std causality from k-th time series to j-th time series given by bootstrap

For GC with signal-dependent noise

TcausMatrix(j,k) --- causality from k-th time series to j-th by GCSDN

TpvalMatrix(j,k) --- p-value of estimated causality, if avaliable


Fig. 3. A screenshot of the output.


This package is developed by Jianfeng Feng group, in accompany of papers

[1] Spatio-temporal Granger causality: a new framework. NeuroImage, 2013, vol 79: 241--263.

[2] Uncovering interactions in the frequence domain. PLoS Comput Biol 2008, 4(5): e1000087.

[3] Attention-dependent modulation of cortical taste circuits revealed by Granger causality with signal-dependent noise PLoS Comput Biol 2013,9(10):e1003265.

[4] Using real-time fMRI to influence differential effective connectivity in the adolescent emotion regulation network, NeuroImage, 2015, in press.

[5] Failed cooperative, but not competitive, interaction between large-scale brain networks impairs working memory in schizophrenia,Psychological Medicine, 2015, accepted.


e-mail:, last updated by Qiang Luo at 19:30 11/24/2015.