简体   繁体   English

为什么Acf和Pacf具有不同的滞后范围

[英]why Acf & Pacf has different lags range

I'm working on time series analysis with ARIMA, and I plotted Acf and Pacf to specify AR , and MA values (p, q), however, when I plot them, the Pacf shows large lags like 10000, 40000, and 70000 even though I specify the lag.max= 20. 我正在使用ARIMA进行时间序列分析,并绘制了Acf和Pacf以指定AR和MA值(p,q),但是,当我绘制它们时,Pacf显示出较大的滞后,例如10000、40000和70000,甚至尽管我指定lag.max = 20。

While in Acf plot, it shows the max.lag =20 在Acf图中显示最大滞后= 20

Could anyone please explain why I've different lags range in my Pacf than my Acf? 谁能解释为什么我的Pacf中的滞后距离与我的Acf中的滞后距离不同?

在此处输入图片说明

在此处输入图片说明

here's simple of my data: 这是我的简单数据:

    Date_Time         Traffic_Flow
2017-07-17 02:00:00     -68
2017-07-17 03:00:00     128
2017-07-17 04:00:00     432
2017-07-17 05:00:00     802
2017-07-17 06:00:00     609
2017-07-17 07:00:00    -612
2017-07-17 08:00:00     -67

The data is in Time series format. 数据为时间序列格式。 Here's is my code: 这是我的代码:

AcfData<- Acf(Data_Stationary, lag.max = 20)
AcfData
PacfData<- pacf(Data_Stationary, lag.max = 20)
PacfData

I suspect you are using the Acf() function from the forecast package, and the pacf() function from the stats package. 我怀疑您正在使用Forecast软件包中的Acf()函数,以及stats软件包中的pacf()函数。 They use different scales to measure lags. 他们使用不同的标度来衡量滞后。 Either use the Pacf() function from the forecast package, or the acf() function from the stats package to get consistent results. 使用预报包中的Pacf()函数或统计包中的acf()函数来获取一致的结果。

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

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