Description Usage Arguments Value Author(s)
Given an x (predictor) and y (response) variable, determine if x causes way at the given lag. Uses the F test statistic to compare/evaluate. The Null Hypothesis (H0) is that Time series x does not Granger-cause time series y, and the Alternative Hypothesis (HA): Time series x Granger-causes time series y
1 | granger_test(x, y, alpha, max_lag = 1)
|
x |
Predictor variable (can be a vector) |
y |
Response variable (can be a vector) |
alpha |
the significance level |
max_lag |
the maximum number of lags to be considered |
A data frame that reports the F statistic, the critical value, and if F > c_v. (if F > c_v we reject the null hypothesis that x does not Granger Cause y)
John Zobitz zobitz@augsburg.edu, based on code from Chandler Lutz, UCR 2009 (https://www.mathworks.com/matlabcentral/fileexchange/25467-granger-causality-test).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.