简体   繁体   中英

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.

While in Acf plot, it shows the max.lag =20

Could anyone please explain why I've different lags range in my Pacf than my 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. 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.

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.

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