简体   繁体   English

如何在 sts.adfuller() 函数测试中设置时间序列数据的恒定滞后数?

[英]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.

相关问题 您如何在statsmodels ADF测试中设置要测试的滞后次数? - How do you set the number of lags to test in the statsmodels ADF test? 在 ARIMA 时间序列建模 python pandas 中提取 Adfuller 测试(平稳性测试)列表中的 p 值 - Extract p values in a list for Adfuller test(Test for stationarity) in ARIMA Time series modeling python pandas 如何使用statsmodels库对时间序列数据运行ADFuller测试? - How to run an ADFuller test on timeseries data using statsmodels library? 删除 Pandas 中特定数据帧的时间序列数据中的滞后/差距 - Remove lags/gaps in time series data for a particular dataframe in pandas 预测在时间序列数据中始终保持不变 - Forecasts are constant all the time in time series data 将数据集拆分为训练并测试 python 中的时间序列分析 - Split data set into train and test for time series analysis in python 测试以检查我的时间序列是否在很长一段时间内保持不变 - Test to check if my time series is constant for a long period of time 如何对时间序列数据运行标准正态同质性检验 - How to run Standard Normal Homogeneity Test for a time series data 如何分析时间数据作为熊猫中一天中时间的函数 - how to analyze time-series data as a function of the time of day in pandas 如何按年份创建时间序列数据的训练/测试拆分? - How to create a train/test split of time-series data by year?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM