Granger (non-)causality tests for a rolling VAR
res=rolvar_granger(res_rolvar,causing,caused,noprint)
* res_rolvar = a 'rolling var' results tlist
* option = the result the user wants to plot ('chi2 stat', 'chi2 pvalue', 'Fisher stat' or 'Fisher pvalue')
* rvar = a results tlist with:
* rvar('meth') = 'rolling var Granger causality'
* rvar('rolvar res') = the input 'rolling var' results tlist
* rvar('causing') = the index vector of the supposed causing variables
* rvar('caused') = the index vector of the supposed caused variables
* rvar('chi2 stat') = the vector of rolling Wald statistics of non-causality
* rvar('chi2 pvalue') = their p-values
* rvar('Fisher stat') = the vector of rolling statistics of non-causality in Fisher form
* rvar('Fisher pvalue') = their p-values
global GROCERDIR; load(GROCERDIR+'\data\france_maunf_survey.dat') bounds() resrolvar=rolvar(6,'endo=fra_past_output;fra_exp_output','nper=120','start_firstbound=1990m1','end_firstbound=2004m1') resrolgranger=rolvar_granger(resrolvar,'fra_exp_output','fra_past_output') // Example taken from function rovar_d; provides Granger non-causality test from France expected output balance to France past output balance // using tlist result resrolvar | ![]() | ![]() |