假设我运行GC测试:
grangercausalitytests(np.vstack((df['target'], df['feature'])).T, maxlag=5)
我可以选择“功能”变量的滞后,这很可能是格兰杰导致的“目标”变量。