The Granger causality test
causality.test(ts1, ts2, lag, diff = FALSE)
Numerical dataframe containing one variable.
The lag parameter.
Logical argument for the option of making data stationary before making the test.
gci: the Granger causality index.
Ftest: the statistic of the test.
pvalue: the p-value of the test.
summary (): shows the test results.
This is the classical Granger test of causality. The null hypothesis is that the second time series does not cause the first one
granger1980NlinTS
# NOT RUN { library (timeSeries) # to extract time series library (NlinTS) data = LPP2005REC model = causality.test (data[,1], data[,2], 2) model$summary () # }
Run the code above in your browser using DataLab