scikits.statsmodels.sandbox.tools.tools_tsa.grangercausalitytests

scikits.statsmodels.sandbox.tools.tools_tsa.grangercausalitytests(x, maxlag)

four tests for granger causality of 2 timeseries

this is a proof-of concept implementation not cleaned up, has some duplicate calculations, memory intensive - builds full lag array for variables prints results not verified with other packages, all four tests give similar results (1 and 4 identical)

Parameters :

x : array, 2d, (nobs,2)

data for test whether the time series in the second column Granger causes the time series in the first column

maxlag : integer

the Granger causality test results are calculated for all lags up to maxlag

Returns :

None : no returns

all test results are currently printed

Notes

TODO: convert to function that returns and compare with other packages

Previous topic

scikits.statsmodels.sandbox.tools.tools_tsa.lagmat2ds

Next topic

scikits.statsmodels.sandbox.tools.tools_pca.pca

This Page