adfuller test gives each variable a different number of lags. hence different P-value. How to get the same p-value, and how to set the no. of lags in each variable?
Theses are adfuller test results for two variables with same size but it shows different number and lags and different p-value!
(-1.6111475029851472,
0.4773732658526479,
2,
1139,
{'1%': -3.4334108531807006,
'5%': -2.862892168387536,
'10%': -2.5674898285322496},
-8273.914480099738)
(-25.304769346612073,
0.0,
1,
1140,
{'1%': -3.4334094211542983,
'5%': -2.8628915360971003,
'10%': -2.5674894918770197},
83264.08934179449)
要强制statsmodels.tsa.stattools.adfuller
使用所需的滞后数,您需要将maxlag
参数设置为所需的滞后数,然后还将autolag
参数设置为None
以强制它使用作为maxlag
作为数字传递的任何内容滞后而不是执行自动滞后顺序搜索例程。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.