I'm expanding a question I posed earlier because I think it was lacking detail.
I'm attempting to forecast daily demand for a restaurant that sells take away food, primarily to office workers on their lunch breaks. They are located in the downtown core of a major city.
They are only open on workdays - no holidays, no weekends. I'm familiar with models that take into account seasonality and trend - Holt-Winters triple exponential smoothing, for example. I'm also familiar with models that take into account complex seasonality and trend - the TBATS package for R, for example.
My problem is that I've identified 8 components that determine sales on a given day:
- The yearly seasonal component. Sales are lower in the summer, for example, when many office workers are on vacation.
- The weekly component. Sales very obviously peak on Thursdays (in the absence of other effects - see below)
- The Friday-Long-Weekend-Effect. The weekly sales pattern changes if the coming Friday is a holiday. Wednesday will typically have higher sales, for example.
- The Post-Friday-Long-Weekend-Effect. The weekly sales pattern changes if the week before was shortened due to the Friday being a holiday.
- The Monday-Long-Weekend-Effect. The weekly sales pattern changes in week $t$ if the Monday in week $t+1$ is a holiday. For example, sales are much lower on Fridays preceding Monday-Long-Weekends. Presumably people are leaving the office early and skipping lunch.
- The Post-Monday-Long-Weekend-Effect. The weekly sales pattern changes if the week is shortened due to the Monday being a holiday.
- The trend component.
- The noise component.
If holidays fell on the same date every year, then the "long-weekend-effects" would be captured in the yearly seasonal component. However, they don't.
My first thought was to include dummy variables. For example, let $X_{M+1}$ be the "Monday-long-weekend-effect" component, and $\beta_{M+1}$ be the associated coefficient, for a given day. Then for the Friday preceding a Monday-Long-Weekend, $X_{M+1}=1$, and for a Friday not preceding a Monday-Long-Weekend, $X=0$.
I'm only using three years of data, so it would be easy for me to change the $X_{M+1}$ values to 0 or 1 by hand for each year. However, I don't know how to include such dummy variables in models like those that I've mentioned.
Any input as to a model that can take into account the components I've mentioned would be greatly appreciated. It seems like I need to capture moving-holiday-effects, day-of-the-week effects, seasonal patterns, and trend, all in one.
Question: Is there a model I can use that can be implemented in R and take into account the components I've listed?
My background: I'm a forth year mathematics and economics student. I've also taken statistics classes, and I'm using R to perform my analysis. This is for a final report for a forth year data analysis class.
self-studytag. – Patrick Coulombe Mar 10 '14 at 21:57