Dear Chandler
Thank you for your great contribution.
Yet I have a question concerning calculating F-statistic,
the parameters for numerator and denominator as at the end of the function
are y_lag and x_lag+y_lag+1.
I read in Wikipedia which says "the simple linear model y = mx + b has p=2 ", if Wikipedia
is right, then the parameters should be "y_lag+1 and x_lag+y_lag+2"
could you please explain this in a simple way? I am quite confused.
*http://en.wikipedia.org/wiki/F-test
5
04 Feb 2012
Granger Causality Test
Conducts a Granger Causality test using the Bayesian Information Criterion to select lag length
This function uses Matlab function "regress" which assumes a constant term(intercept) in the linear regression and therefore violates Granger causality definition(See Granger's original paper, Econometrica 37:3 424-438, 1969).
I applied this function on two random numbers series (10 time points, lag = 2) and repeated 1000 times (every time the two series are different), and set the alpha value as 0.05. Among the 1000 tests, 400 were found to have "Granger causality"! So I think the result is not reliable.
1
05 Aug 2011
Granger Causality Test
Conducts a Granger Causality test using the Bayesian Information Criterion to select lag length
Dear Chandler, I have gratefully downloaded your script. How would it be possible to also include a stationarity check into the routine or would you recommend to check stationarity of the series beforehand? Many thanks, Wolfgang
5
18 Mar 2010
Granger Causality Test
Conducts a Granger Causality test using the Bayesian Information Criterion to select lag length
This appears to calculate the same x and y lags regardless of the actual lags present between the two vectors. In addition, the F statistic generated by the function only appears valid for specific (small) lags. The test I used involved a simple pair of sinusoids phase-shifted to various degrees with and without a small amount of Gaussian noise.
Comment only