4
$\begingroup$

I am trying to model daily sales for a take out restaurant. They are only open on business days - no holidays or weekends - as their primary clients are office workers on their lunch breaks.

Below is what two years of the daily sales time series looks like.

enter image description here

The days with zero sales, as you can see above, are the days that the restaurant was closed due to a public holiday (Easter Monday etc.). There is definitely a weekly pattern: sales tend to peak on Thursdays. Furthermore, the presence of a holiday changes the sales pattern in the surrounding weeks (the week before and the week after).

You might notice that there are sales spikes before or after certain holidays. An example of this: if Monday is a holiday, sales tend to be much lower on the Friday before that long weekend - presumably office workers leaving work early.

There are also yearly seasonal patterns. Sales are lower in the summer, for example, presumably, in part, because many office workers are taking their vacations.

My approach has been to use a ARIMAX model to fit the data (using R). I've followed the approach suggested by Rob Hyndman here. The difference is that I'm using only Mon-Fri, so my frequency is 5, and I've added dummy variables for all of the days that the restaurant is closed (holidays).

The model fit is not very good so far, of course. I haven't done anything to take into account the effect of a holiday on the surrounding days. Further, I'm including the holidays as days with sales equal to zero, so this must throw off the model.

Here is what R returns:

ARIMA(0,1,1)(1,0,1)[5]                    

Coefficients:
     ma1     sar1    sma1      Mon       Tue       Wed      Thu     Day    Newyears   FamilyDay  GoodFriday      Easter  VictoriaDay   CanadaDay    CivicDay
  -0.804  -0.2608  0.3255  54.4530  113.8052  152.0052  -6.3025  0.0388  -1545.1973  -1604.5038  -1581.6740  -1586.8710    -1628.253  -1437.6075  -1181.0054
s.e.   0.028   0.4641  0.4529  23.2788   23.3748   23.4900  23.4367  1.5546    117.6128    113.6446    113.8825    114.5609      114.786    112.7561    114.0031
   LabourDay  Thanksgiving
  -1310.3416    -1332.8028
s.e.    113.5081      113.5179

sigma^2 estimated as 28269:  log likelihood=-3305.08
AIC=6646.16   AICc=6647.56   BIC=6722.2

I think I should include the month of the year as a dummy variable to capture yearly seasonal effects as well.

My questions:

  1. What can I do to capture "long weekend effects"? Should I included a dummy variable for every Friday that proceeds a long weekend etc?
  2. How should I deal with the holidays that the restaurant was closed for? If I remove them, then the week lengths will not be the same. If I include them, then they are outliers that throw everything off.
  3. What else can I do to improve my model?

Thanks very much for any input.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.