The files Example1.m and Example2.m are meant to reproduce the simulations of the paper "A study of problems encountered in Granger causality analysis from a neuroscience perspective", PNAS vol. 114 no. 34 E7063โE7072, doi: 10.1073/pnas.1704663114 http://www.pnas.org/content/114/34/E7063.abstract , using both the formulation in which full and reduced vector autoregressive models are fitted separately, leading to a bias or variability, and the State Space formulation, allowing closed form computation of Granger Causality, greatly reducing both bias and variability.
These results are described in the preprint: "On the interpretability and computational reliability of frequency-domain Granger causality", by Luca Faes, Sebastiano Stramaglia, Daniele Marinazzo https://arxiv.org/abs/1708.06990