0

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?

enter image description here

enter image description here

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
Reta
  • 363
  • 3
  • 4
  • 15

1 Answers1

1

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.

Rob Hyndman
  • 30,301
  • 7
  • 73
  • 85