# Using Forecast Package with Weights

I have data since 2013 until September 2015.

I've used ARIMA and HoltWinter package in R, and they've been helpful in providing a good enough range. I backtested 2013 and 2014 data, and forecasted the first two months of 2015 in order to see the effectiveness of the models.

HoltWinter's point forecast provide a forecast with 92% accuracy; whereas ARIMA (basic forecast() function) yielded a horrible point forecast, but the High 80 provided data that were 98% in its accuracy.

When predicting the the month of March, the forecasting wasn't accurate as predictable events changed the growth pattern. Which is currently a problem I'm trying to overcome:

If I have future data (like upcoming campaigns or events that will influence the shift), is there a way to place weights unto my data in order to attain a better point forecast, and a narrower range?

The following is my data set:

             Jan         Feb         Mar         Apr         May         Jun
2013  3195192781  2606422285  2594936757  2517205695  2438385639 13862430738
2014  3067035426  2560556889  2505293863  2417450086  2255966873  2555497109
2015  3507620376  2873085434  4333775070  3585868583  3041188609  3131197550
Jul         Aug         Sep         Oct         Nov         Dec
2013  2925506655  2728647400 10948454069  5323935540  4125424142  3321004801
2014  2344100258  2435105729  7404847006  5027479552  4160851017  3886407118
2015  2994265048  3079366844  5991324696


The following is a graph representing the trends - jumps in September across all years, bumps in June (2013 is an outlier). However, during October, the decay will be more apparent in 2015 as no events will exist for October.

I would like to express that to the system in order to forecast better data for the months of October, November and December using weights.

• In the markeitng area, we often separate the effect of promotional events (which look similar to the spikes you have here) from the base sales, and model the two of them separately. See, for example, Abraham and Lodish articles in Marketing Science, and articles which reference them. I'd also take @IrishStat up on his generous offer. – zbicyclist Oct 10 '15 at 20:03

You write "If I have future data (like upcoming campaigns or events that will influence the shift" . I write do you know when these events occurred in the past ? If do create a data matrix (excel file) showing all and upload it . It appears that you have "events" going on in September and October or activity in September with residual impact for a few months thereafter.

EDIT: AFTER RECEIPT OF DATA

The word weights normally connotes model coefficients or values used in "weighted regression" . Your are clearly using "weights" to reflect events . I took your data and used AUTOBOX ( a software application that I have helped develop ) and obtained the following equation using it's automatic features. To paraphase (comment on ) the model there was a positive response to events and two unusually high values (june and sept in 2013 ) and a seasonal (repetitive pulse) starting in june 2014 . THe statistical summary of the model is here . The Actual/Fit and Forecast is here with forecasts here .

• Sure. Here is the excel file – Adib Oct 12 '15 at 19:47
• That seems a bit difficult to understand given the forecast does not represent the decay effect. Using R's forecast, I received the following forecast points: i.imgur.com/iCcKpc9.png - which helps present a more realistic forecast by presenting a decay caused by September. However, I do like the fact that the system did show future projections of similar events. – Adib Oct 13 '15 at 1:43
• My biggest disadvantage at present is the data I want (pre-2013) is archived and is expensive to retrieve. I'll see if I can dig up more data and see how projections and forecasting can be improved – Adib Oct 13 '15 at 1:44
• you had an event in oct 14 which would collide with any decay as there was an event in sept 14. It is always possible to specify a decay effect around a promotion but when you have multiple events at successive observations with a small sample size it may not be possible to automatically detect but it could be easily specified.. – IrishStat Oct 13 '15 at 2:33
• I'll see what I can dig up in a big and see if I can pull whatever I can from the archived data. I'll post new results tomorrow – Adib Oct 13 '15 at 5:22