[英]How to set constant number of lags of a time series data inside sts.adfuller() function test?
adfuller test gives each variable a different number of lags. adfuller 检验为每个变量提供不同数量的滞后。 hence different P-value.
因此不同的P值。 How to get the same p-value, and how to set the no.
如何获得相同的 p 值,以及如何设置编号。 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!这些是两个具有相同大小的变量的更完整的测试结果,但它显示了不同的数量和滞后以及不同的 p 值!
(-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
作为数字传递的任何内容滞后而不是执行自动滞后顺序搜索例程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.