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