TransWikia.com

Plot of ACF & PACF

Data Science Asked on August 13, 2021

There are 96 observations of energy consumption per day from 01/05/2016 – 31/05/2017. I am trying an ARIMA model in R to be fitted to these time series observations. I have chosen the frequency of time series as 96. In total, there are 38016 observations.
I have cleaned the series using tsclean command in R to remove the outliers.

timeseries <- ts(full$consumption, frequency = 96)

enter image description here

Cleansed time series:

timeseries <- tsclean(timeseries)

enter image description here

I have then differenced the series:

diffts <- diff(timeseries)

differenced timeseries

I have then decomposed the series to obtain the seasonal component from it. Subtracted the seasonal component from it to deseasonalize it.

difftscomponent <- decompose(diffts)
adjusted_diffts <- diffts - difftscomponent$seasonal

The ACF plot of final time series:

acf(adjusted_diffts)

enter image description here

The PACF of the final time series:

pacf(adjusted_diffts)

enter image description here

There are three questions:

  1. Normally, the X-axis of ACF and the PACF plot of the time series will show lag order from 1 to … . There will be integer values indicating the number of lags. Then why in my case there are decimal values from 0.1…. ? What does that indicate? What to do to get number of lags?

  2. What will be the probable order of AR and MA in my case by looking at ACF and PACF plot?

  3. I have transformed the original time series i.e. made it stationary and deseasonalized it in order to fit an ARIMA model. By looking at the final adjusted time series, can it be said that it is fit to be modelled OR will it require any further transformation?

One Answer

Try using the below code:

Acf(x, lag.max = 12, type = c("correlation", "covariance", "partial"), plot = TRUE, na.action = na.contiguous, demean = TRUE)

Pacf(x, lag.max = 12, plot = TRUE, na.action = na.contiguous, demean = TRUE)

Answered by SBUGZOH2. on August 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP