简体   繁体   English

ACF 和 PACF plot 的置信度非常小。 如何解读?

[英]ACF and PACF plot has very small confidence level. How to interpret?

I'm rather new at programming at general so do forgive me if the question is rather basic.一般来说,我在编程方面相当陌生,所以如果问题相当基本,请原谅我。

I'm trying to determine my p , d , q values for an ARIMA model and I've already conducted an adfuller test that determined that my time series is stationary.我正在尝试确定ARIMA model 的pdq值,并且我已经进行了更全面的测试,确定我的时间序列是静止的。 However, when I plot out my ACF and PACF plots, I get the following:但是,当我 plot 出我的ACFPACF图时,我得到以下信息:

ACF plot ACF plot

PACF plot PACF plot

From what I've read about the p values, I'm supposed to pick the value where the line first crosses the confidence interval except I'm not sure why my confidence intervals for both are that small?从我读到的关于p值的内容中,我应该选择线首先穿过置信区间的值,除非我不确定为什么我的两者的置信区间都那么小? Does this mean that my MA value should be 2 according to the PACF plot?这是否意味着根据PACF plot,我的MA值应该是 2? Any help in interpreting the graphs would be appreciated!任何解释图表的帮助将不胜感激!

My code:我的代码:

from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
fig = plt.figure(figsize=(20, 12))

fig = plot_acf(train_set.dropna(), lags=10)
fig = plot_pacf(train_set.dropna(), lags=10)

The d component is used to make the data stationary by differencing, if the adf test (and kpss test) shows that the data is stationary, you can probably set it to 0. However, keep in mind that you cannot trust these tests by 100 %. d 分量用于通过差分使数据平稳,如果 adf 测试(和 kpss 测试)显示数据是平稳的,您可以将其设置为 0。但是,请记住,您不能信任这些测试 100 %。

The confidence interval indicates whether the correlation is statistically significant, meaning that the correlation is very likely not to be random.置信区间表明相关性是否在统计上显着,这意味着相关性很可能不是随机的。 All bars that cross the confidence interval are “real” correlations that you can use for modeling.所有跨置信区间的条形图都是可用于建模的“真实”相关性。

There are thousands of thumb rules to interpret these plots.有数以千计的拇指规则来解释这些图。 I recommend the following:我推荐以下内容:

If the ACF trails off, use an MA model with the significant and strong correlations from the PACF.如果 ACF 下降,请使用 MA model 与 PACF 的显着和强相关性。

If the PACF trails off, use an AR model with the significant and strong correlations from the ACF.如果 PACF 下降,请使用与 ACF 的显着和强相关性的 AR model。

You can also have a look here:你也可以在这里看看:

https://towardsdatascience.com/identifying-ar-and-ma-terms-using-acf-and-pacf-plots-in-time-series-forecasting-ccb9fd073db8 https://towardsdatascience.com/identifying-ar-and-ma-terms-using-acf-and-pacf-plots-in-time-series-forecasting-ccb9fd073db8

I guess you created the plots with statsmodels, in that case you shoud keep in mind that lag 0 (the first in the plots) is the correlation of the time series with itself, therefore it will always be +1 and significiant, you can ignore this lag.In your case, the ACF is trailing off, and the PACF has only one statistically significant and strong correlation with the first lag, perhaps you can also use 2, 3 and 4 but they are very weak.我猜您使用 statsmodels 创建了图,在这种情况下,您应该记住滞后 0(图中的第一个)是时间序列与其自身的相关性,因此它始终为 +1 且显着,您可以忽略这个滞后。在你的情况下,ACF 正在下降,而 PACF 与第一个滞后只有一个统计显着性和强相关性,也许你也可以使用 2、3 和 4,但它们非常弱。 Best is of course if you just try it out.最好的当然是如果你只是尝试一下。 Or you can use pmdarima's auto_arima() function:或者您可以使用 pmdarima 的auto_arima() function:

https://alkaline-ml.com/pmdarima/tips_and_tricks.html https://alkaline-ml.com/pmdarima/tips_and_tricks.html

https://alkaline-ml.com/pmdarima/modules/generated/pmdarima.arima.auto_arima.html https://alkaline-ml.com/pmdarima/modules/generated/pmdarima.arima.auto_arima.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM