简体   繁体   中英

Plot of ACF & PACF

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)

在此处输入图片说明

Cleansed time series:

timeseries <- tsclean(timeseries)

在此处输入图片说明

I have then differenced the series:

diffts <- diff(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)

在此处输入图片说明

The PACF of the final time series:

pacf(adjusted_diffts)

在此处输入图片说明

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 ie 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?

  1. This is the result of formatting your data.frame as time.series . I can't test it right now since I don't have access to R right now but going back to a simple data.frame should do the job, something along (there probably is a more elegant way):

     acf(data.frame(adjusted_diffts) 
  2. While the plotted ACF/PACF gives you an indication which lags need to be corrected the selection of the ARIMA-Order should be done by eg checking multiple combinations of ARIMA(p,d,q) and choose the one with the best (lowest) AIC. Here is an article + code example to test for different orders.

  3. This I can't answer with certainty. I would use the data you have and after, fitting an ARIMA model, check the residuals for any remaining structure. If there still is structure in the residuals you might need need to adjust your data/model.

Edit: formatting

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