Description Usage Arguments Details Value References Examples
The Granger causality test
1 | causality.test(ts1, ts2, lag, diff = FALSE)
|
ts1 |
Numerical dataframe containing one variable. |
ts2 |
Numerical dataframe containing one variable. |
lag |
The lag parameter. |
diff |
Logical argument for the option of making data stationary before making the test. |
This is the classical Granger test of causality. The null hypothesis is that the second time series does not cause the first one
gci: the Granger causality index.
Ftest: the statistic of the test.
pvalue: the p-value of the test.
summary (): shows the test results.
granger1980NlinTS
1 2 3 4 5 |
Loading required package: Rcpp
Loading required package: timeDate
------------------------------------------------
Test of causality
------------------------------------------------
The lag parameter: p = 2
The value of the F-test: 1.01356
The p_value of the F-test: 0.36393
The critical value with 5% of risk:: 3.087
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.