Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. > testData.df
  2. Date Sales
  3. 1 Jan-13 1004078
  4. 2 Feb-13 912734
  5. 3 Mar-13 988705
  6. 4 Apr-13 902736
  7. 5 May-13 939328
  8. 6 Jun-13 940007
  9. 7 Jul-13 881127
  10. 8 Aug-13 1022384
  11. 9 Sep-13 919752
  12. 10 Oct-13 743247
  13. 11 Nov-13 1426428
  14. 12 Dec-13 270556
  15. 13 Jan-14 1124901
  16. 14 Feb-14 896759
  17. 15 Mar-14 912444
  18. 16 Apr-14 1046760
  19. 17 May-14 828060
  20. 18 Jun-14 1049858
  21. 19 Jul-14 1017681
  22. 20 Aug-14 1155440
  23. 21 Sep-14 1216358
  24. 22 Oct-14 1139405
  25. 23 Nov-14 1131746
  26. 24 Dec-14 1007372
  27. 25 Jan-15 894100
  28. 26 Feb-15 753241
  29. 27 Mar-15 741080
  30. 28 Apr-15 732739
  31. 29 May-15 826085
  32. 30 Jun-15 813362
  33. 31 Jul-15 962813
  34. 32 Aug-15 644084
  35. 33 Sep-15 1126036
  36. 34 Oct-15 889667
  37. 35 Nov-15 880956
  38. 36 Dec-15 786907
  39. 37 Jan-16 706587
  40. 38 Feb-16 944412
  41. 39 Mar-16 960048
  42. 40 Apr-16 878436
  43. 41 May-16 784348
  44. 42 Jun-16 830803
  45.  
  46. ## ets() forecast with cleaned data
  47. # multicative seasonality (Holy-Winters method)
  48. fit1 <- ets(train_ts.clean, model = "MAM", damped = T)
  49. ets.f1 <- forecast(fit1,
  50. #forecast 12 months ahead
  51. h = 12,
  52. #90% and 99% confidence level
  53. level = c(90, 99))
  54. plot(ets.f1)
  55. lines(fit1$states[,1], col = 'red')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement