I am new to R. I am trying to apply forecasting model Time Series (TS) Model as follows:
- Plotting original data,
- Simple Moving Average,
- Auto correction(AC), Partial AC, Differencing of TS etc to get stationary time series,
- Fitting optimal model which gives minimum AIC, residuals from ARIMA/ARMA
- Normality test for residuals
- forecasting for future values
The forecast figures are not coming out with the accuracy that I expected. Please find following weekly incidents.
Can anyone please help me with the right approach and sample code?
There are some outliers in the data (# of incidents per week) due to new release of application, seasonality effect and holiday period.
March 11, 2011/ March 25, 2011/ June 24, 2011/December 02, 2011/ December 30, 2011/ March 30, 2012/ April 20, 2012/ Time_Stamp Wkly_Cnt 1 November 19, 2010 9 2 November 26, 2010 22 3 December 03, 2010 11 4 December 10, 2010 12 5 December 17, 2010 18 6 December 31, 2010 17 7 January 07, 2011 14 8 January 14, 2011 21 9 January 21, 2011 16 10 January 28, 2011 22 11 February 04, 2011 20 12 February 11, 2011 31 13 February 18, 2011 38 14 February 25, 2011 37 15 March 04, 2011 32 16 March 18, 2011 34 17 April 01, 2011 28 18 April 08, 2011 32 19 April 15, 2011 30 20 April 29, 2011 30 21 May 06, 2011 25 22 May 13, 2011 19 23 May 20, 2011 17 24 May 27, 2011 28 25 June 03, 2011 13 26 June 10, 2011 17 27 June 17, 2011 17 28 July 01, 2011 14 29 July 08, 2011 22 30 July 15, 2011 19 31 July 22, 2011 11 32 July 29, 2011 14 33 August 05, 2011 14 34 August 12, 2011 21 35 August 19, 2011 20 36 August 26, 2011 16 37 September 02, 2011 16 38 September 09, 2011 10 39 September 16, 2011 24 40 September 23, 2011 12 41 September 30, 2011 17 42 October 07, 2011 32 43 October 14, 2011 29 44 October 21, 2011 19 45 October 28, 2011 13 46 November 04, 2011 12 47 November 11, 2011 18 48 November 18, 2011 14 49 November 25, 2011 17 50 December 09, 2011 36 51 December 16, 2011 20 52 December 23, 2011 22 53 January 06, 2012 31 54 January 13, 2012 29 55 January 20, 2012 20 56 January 27, 2012 27 57 February 03, 2012 14 58 February 10, 2012 23 59 February 17, 2012 20 60 February 24, 2012 15 61 March 02, 2012 26 62 March 09, 2012 19 63 March 16, 2012 25 64 March 23, 2012 26 65 April 06, 2012 12 66 April 13, 2012 20 67 April 27, 2012 20 68 May 04, 2012 16 69 May 11, 2012 17 70 May 18, 2012 17 71 May 25, 2012 20 72 June 01, 2012 14 73 June 08, 2012 23 74 June 15, 2012 21 75 June 22, 2012 22 76 June 29, 2012 19
with ACTUAL-FIT-FORECAST as
. The residual ACF suggests an adequate model.
. The solution process is straigtforward in this case : Set uo a 51 weekly dummy model . AUTOBOX keeps two weeks as being significant. DEtect the need for a Level Shift at weeks 12 and 25 in the first year and incorporate two dummy level shift indicators into the regression then detect the 5 points in time where unusual values occurred and incorporate pulse indicators into the regression.