I am trying to forecast the sales for next 48 days from the data given by modelling for multiple seasonality and day of week , promotional effects. R could not come up with a suitable model. I need help to figure out what I am doing wrong.

Given data has daily sales information of a store for 2 years and 7 months along with other information like holidays, promotion, week of year etc as shown below. Sales is 0 when store is closed. I have replaced 0 sales with NA's as mentioned in this post https://stats.stackexchange.com/q/347074/208891

As it can be seen from the below 2 screenshots, sales are highest during mondays and when promotion=1. sales hit the bottom on sundays when promo=0

enter image description here

enter image description here

I found that, the series shows both weekly and yearly seasonality using the results of tbats:

yearly <- ts(store_578[,6], frequency=365)
fit_yearly <- tbats(yearly)
seasonal <- !is.null(fit_yearly$seasonal)
weekly <- ts(store_578[,6], frequency=7)
fit_weekly <- tbats(weekly)
seasonal <- !is.null(fit_weekly$seasonal)

So, I created a multi seasonality time series

store_578_ts <- msts(store_578[,-1], seasonal.periods=c(7,365))

The resulting plot:

enter image description here

I built a dynamic harmonic regression model with fourier terms for multiple seasonality. To model the day of week effects that I mentioned above, I created 6 dummy variables (day1,day2..day6) and included them along with promotion and foruier terms

xreg <- cbind(fourier(store_578_ts[,"Sales"], K = c(1,3)),dummy)
fit_578 <- auto.arima(store_578_ts[,"Sales"], xreg = xreg, lambda=0,seasonal = FALSE, stationary = TRUE)

Error in auto.arima(store_578_ts[, "Sales"], xreg = xreg, seasonal = FALSE,  
:   No suitable ARIMA model found

Am I missing something here? I really need some help with this.

Note:It is able to get me a model if I use only weekly seasonality, instead of multiple.

  • $\begingroup$ The dummy variables are confounded with the Fourier terms. $\endgroup$ May 21 '18 at 5:43
  • $\begingroup$ Sir, I am not sure if I get that. I have added the dummy variables and fourier terms in a single xreg matrix. $\endgroup$
    – spv92
    May 21 '18 at 5:49
  • $\begingroup$ Don't add the dummy variables. You don't need them. The Fourier terms handle the day-of-week seasonality. $\endgroup$ May 21 '18 at 5:51
  • $\begingroup$ ARIMA is not suitable for daily data as daily data might have multiple seasonalities. tbats can capture multiple seasonalities. $\endgroup$
    – Ferdi
    May 21 '18 at 6:52
  • $\begingroup$ @Ferdi. The question was proposing a dynamic harmonic regression which does allow for multiple seasonality. $\endgroup$ May 21 '18 at 9:33

This site is temporarily in read only mode and not accepting new answers.

Browse other questions tagged .