@exia1zZ a formula specification of a bivariate series like y ~ x.
Currently, the methods for the generic function grangertest only perform tests for Granger causality in bivariate series. The test is simply a Wald test comparing the unrestricted model—in which y is explained by the lags (up to order order) of y and x—and the restricted model—in which y is only explained by the lags of y.
@exia1zZ ## Which came first: the chicken or the egg?
data(ChickEgg)
## chickens granger-cause eggs?
grangertest(egg ~ chicken, order = 3, data = ChickEgg)
## eggs granger-cause chickens?
grangertest(chicken ~ egg, order = 3, data = ChickEgg)
应该后面那个才是预期的格兰杰原因吧