I am performing a time series analysis on a daily time series. I know that there is a weekly period (7 days) and also a montly seasonality. For now, i set the time series object in R using a ts(x=mysequence, frequency = 7) and modeled the time series using an auto.arima with xreg parameter containing a 11 columns matrix of dummies tied to each months (January base level). I was told that a better approach to handle multiple seasonality (within ARIMA context) is to use Fourier terms instead of monthly dummies. So I come out with this code from Rob Hyndman:

y <- ts(x, frequency=7)
z <- fourier(ts(x, frequency=365.25), K=5)
zf <- fourierf(ts(x, frequency=365.25), K=5, h=100)
fit <- auto.arima(y, xreg=cbind(z,holiday), seasonal=FALSE)
fc <- forecast(fit, xreg=cbind(zf,holidayf), h=100)

My doubt is twofold:

  1. what is the criteria to choose K for montlhy patterns? How can I perform a - priori selection of K?
  2. why the code shows seasonal=FALSE. I would put seasonal = TRUE to capture weekly frequency patters.

I am using R and forecast R package to perform the analysis.

  • $\begingroup$ Please make your example reproducible. $\endgroup$ – user81847 Nov 26 '15 at 1:58
  1. Minimize the AICc

  2. The seasonality is handled via the Fourier terms, so does not need to be handled via the ARIMA errors.


Not the answer you're looking for? Browse other questions tagged or ask your own question.