I have daily data for 3 years. This sales data is of seasonal nature as business has spikes and downfall by month. Also, sales differ by each day of the week. for example, monday in general in a month tend to have similar pattern.

I have used ARIMA and created a matrix of month dummy variables and day of week dummy variables and have passed that in ARIMA. however i hit the bottom when i couldn't reconvert differenced stationary number forecasts into the actual sales metric. Posted here already

I have also tried dummy regression using sales as dependent variable and 11 month dummy variables and 6 day of week dummy variables. i abandoned this as R square was low at 48% and MAPE from the forecasted results was more than 20%

Edit: I have tried auto.arima as well. My question: What technique can i use for forecasting sales for next 365 days? that will consider this month of the year and day of the week seasonality?

  • $\begingroup$ you can use auto.arima model in odrer to make your prediction $\endgroup$ – joo Dec 29 '15 at 16:30
  • $\begingroup$ why you have used xreg=diff(diff(xreg) this in your auto.arima model ? $\endgroup$ – joo Dec 29 '15 at 16:48
  • $\begingroup$ @joo please see my comment in the other post where i have pasted the code. Thanks stats.stackexchange.com/questions/188595/… $\endgroup$ – StatguyUser Dec 29 '15 at 17:02

You might want to look at http://www.autobox.com/pdfs/capable.pdf starting with slide 43 for an example and any number of my responses to this list as this subject has come up many times.

The issue is that DAILY DATA can be largely dependent on deterministic variables like day-of-the-week, week-of-the-year, month of-the-year, week-of-the-month, long-weekends, Fridays-before-a-Monday-Holiday or Mondays-after-a-Friday-Holiday and/or particular days-of-the-month effects.

A major hurdle for you is that holidays (before, on and after) are important and heuristics (i.e. not simply done!) are required to identify many of these structures. Furthermore there may be changes in daily patterns over time and different volatilities (uncertainties/variability) for different days of the week.

To determine these factors requires searching for patterns, not just fitting coefficients. Detecting level shifts and local time trends along with one-time unusual values is also critical beside correctly forming an appropriate structure (i.e. ARIMA model identification) is also critical as one needs to craft together a number of competing model possibilities. Finally changing error variance and/or changing model parameters over time need to be considered as they can come into play quite frequently.

In closing one needs to possibly bring user-specified predictor series and their lead and lag structure which may be needed to explain the series of interest.

| cite | improve this answer | |
  • $\begingroup$ Thanks @IrishStat. I did in fact land in your website a while ago before posting this and saw this wonderful example. Any similar example in R? $\endgroup$ – StatguyUser Dec 29 '15 at 18:14
  • $\begingroup$ If you contact the folks at AFS they might be able to help you as I believe they are launching an R version. $\endgroup$ – IrishStat Dec 29 '15 at 19:11
  • $\begingroup$ Pardon me for not understanding. What is AFS? $\endgroup$ – StatguyUser Dec 29 '15 at 19:26
  • $\begingroup$ Automatic Forecasting Systems ( autobox.com ) the people who develop and market AUTOBOX ( which I helped develop) $\endgroup$ – IrishStat Dec 29 '15 at 20:16
  • 1
    $\begingroup$ I suggest combining ARIMA and the monthly and daily dummies . I also suggest that you consider possible changes in the daily dummies ( found via Intervention Detection unc.edu/~jbhill/tsay.pdf schemes. You should also strongly consider detection and treatment of one-time pulses and possible error variance (over time) homogeneity tests . It appears that holidays are not important nor needed for your data. $\endgroup$ – IrishStat Dec 31 '15 at 0:15

For the seasonality you can specify two different seasons using msts in the forecast package in R. You can read about it in the authors blog here.

| cite | improve this answer | |
  • $\begingroup$ 1. No Outlier Detection $\endgroup$ – IrishStat Dec 29 '15 at 20:21
  • $\begingroup$ Plus lets say i have daily data, how do i set frequency for month? should i set 30? Sorry it does not have the answer i am looking for in addition to outlier detection and possible holiday adjustment. $\endgroup$ – StatguyUser Dec 29 '15 at 20:24
  • $\begingroup$ Ya frequency would be 30 and 365 for the seasonality then you'd have to use that data with some other method for forecasting and outlier detection. Figured I'd just mention this since default ts doesn't allow you to specify two different seasons. Was going to just add it as a comment but not enough points yet. $\endgroup$ – Kristofersen Dec 29 '15 at 20:28
  • $\begingroup$ No lead and lag around holidays . No concern for particular days of the month or particular weeks or dynamics in daily effects $\endgroup$ – IrishStat Dec 29 '15 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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