Solved – What to do about Seasonality Patterns in ACF, Time Series Data

arimaautocorrelationrseasonalitytime series

I'm dealing with a time series data and I'm trying to construct a time series model for this particular dataset. I'm new to R and tried using the the auto.arima function under the forecast package:

fit <- auto.arima(tsdata, xreg=cbind(CSS2$Month,CSS2$DayID,CSS2$Year), 
                  stepwise=FALSE, approximation=FALSE)
summary(fit)
resid(fit)
acf(resid(fit))

However, I noticed some problems in the ACF plot and the PACF plot from the resulting model. Both of those appear to show some trends or seasonality.
The data that I'm dealing with do have some strong seasonal patterns (on a weekly basis and on a monthly basis), and I thought that this would be captured using auto.arima. I do have the most recent version of the forecast package.
I should mention that I have daily data for 3 years, so there are a total of 1095 observations.

Any suggestions would be much appreciated, thank you!

ACF Plot PACF Plot

Best Answer

You can see in the arima code that there is a seasonal component that is set to (0,0,0), it is the seasonal AR, I, and MA component that you can change the values for. So if you're using an AR(1) that also has a seasonal AR(12) (annual seasonal AR), then the seasonal c=(0,0,0) vector should be (1,0,0) and the period should be changed from NA as well to say what the period of the season is.

arima(x, order = c(0, 0, 0),
      seasonal = list(order = c(0, 0, 0), period = NA),      
      xreg = NULL, include.mean = TRUE,
      transform.pars = TRUE,
      fixed = NULL, init = NULL,
      method = c("CSS-ML", "ML", "CSS"),
      n.cond, optim.method = "BFGS",
      optim.control = list(), kappa = 1e6)
Related Question