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
More resources, including demos and videos, for implementing and speeding up Monte Carlo simulations in both MATLAB and Simulink man be found here:
http://www.mathworks.com/discovery/monte-carlo-simulation.html
Hi Nils,
The logic of your program is very clear but I still have few questions. Hope you can give me some hints.
1. Why did you use VarY in step 5 but not the variance of the short rate?
2. In eqn c.11, why the first term is missed comparing to the eqn.76 in the paper?
3. How did you deal with the R matrix?
Do you have an updated file? If yes, could you upload the file or send a copy to me?
Thanks in advance!
Comment only
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.
Comment only