Forecasts
df_timeseries <- log(df_timeseries)
df_timeseriesforecasts <- HoltWinters(df_timeseries, beta=FALSE, gamma=FALSE)
df_timeseriesforecasts
## Holt-Winters exponential smoothing without trend and without seasonal component.
##
## Call:
## HoltWinters(x = df_timeseries, beta = FALSE, gamma = FALSE)
##
## Smoothing parameters:
## alpha: 0.7317843
## beta : FALSE
## gamma: FALSE
##
## Coefficients:
## [,1]
## a 27.98027
df_timeseriesforecasts$SSE
## [1] 2.825379
plot(df_timeseriesforecasts)

df_timeseriesforecasts2 <-
forecast:::forecast.HoltWinters(df_timeseriesforecasts, h=48)
forecast:::plot.forecast(df_timeseriesforecasts2)

## Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
## Jan 2020 27.98027 27.70017 28.26038 27.55188 28.40866
## Feb 2020 27.98027 27.63318 28.32737 27.44943 28.51112
## Mar 2020 27.98027 27.57717 28.38338 27.36378 28.59677
## Apr 2020 27.98027 27.52805 28.43250 27.28865 28.67190
## May 2020 27.98027 27.48376 28.47679 27.22092 28.73963
## Jun 2020 27.98027 27.44311 28.51744 27.15876 28.80179
## Jul 2020 27.98027 27.40533 28.55522 27.10097 28.85958
## Aug 2020 27.98027 27.36988 28.59067 27.04676 28.91379
## Sep 2020 27.98027 27.33639 28.62416 26.99553 28.96502
## Oct 2020 27.98027 27.30455 28.65600 26.94684 29.01371
## Nov 2020 27.98027 27.27414 28.68641 26.90033 29.06021
## Dec 2020 27.98027 27.24499 28.71556 26.85575 29.10480
## Jan 2021 27.98027 27.21695 28.74360 26.81288 29.14767
## Feb 2021 27.98027 27.18991 28.77064 26.77152 29.18903
## Mar 2021 27.98027 27.16376 28.79679 26.73153 29.22902
## Apr 2021 27.98027 27.13843 28.82212 26.69278 29.26777
## May 2021 27.98027 27.11383 28.84672 26.65516 29.30539
## Jun 2021 27.98027 27.08991 28.87064 26.61859 29.34196
## Jul 2021 27.98027 27.06662 28.89393 26.58297 29.37758
## Aug 2021 27.98027 27.04391 28.91664 26.54823 29.41232
## Sep 2021 27.98027 27.02174 28.93881 26.51432 29.44623
## Oct 2021 27.98027 27.00007 28.96048 26.48118 29.47937
## Nov 2021 27.98027 26.97886 28.98169 26.44875 29.51180
## Dec 2021 27.98027 26.95810 29.00245 26.41699 29.54356
## Jan 2022 27.98027 26.93775 29.02280 26.38587 29.57468
## Feb 2022 27.98027 26.91779 29.04276 26.35534 29.60521
## Mar 2022 27.98027 26.89820 29.06235 26.32538 29.63517
## Apr 2022 27.98027 26.87895 29.08160 26.29595 29.66460
## May 2022 27.98027 26.86004 29.10051 26.26702 29.69353
## Jun 2022 27.98027 26.84144 29.11911 26.23858 29.72197
## Jul 2022 27.98027 26.82314 29.13741 26.21059 29.74996
## Aug 2022 27.98027 26.80513 29.15542 26.18304 29.77751
## Sep 2022 27.98027 26.78738 29.17317 26.15590 29.80465
## Oct 2022 27.98027 26.76990 29.19065 26.12917 29.83138
## Nov 2022 27.98027 26.75267 29.20788 26.10281 29.85774
## Dec 2022 27.98027 26.73567 29.22488 26.07682 29.88373
## Jan 2023 27.98027 26.71890 29.24165 26.05117 29.90938
## Feb 2023 27.98027 26.70236 29.25819 26.02587 29.93468
## Mar 2023 27.98027 26.68602 29.27453 26.00089 29.95966
## Apr 2023 27.98027 26.66989 29.29066 25.97621 29.98433
## May 2023 27.98027 26.65396 29.30659 25.95184 30.00871
## Jun 2023 27.98027 26.63821 29.32234 25.92776 30.03279
## Jul 2023 27.98027 26.62265 29.33790 25.90396 30.05659
## Aug 2023 27.98027 26.60726 29.35329 25.88043 30.08012
## Sep 2023 27.98027 26.59204 29.36851 25.85716 30.10339
## Oct 2023 27.98027 26.57699 29.38356 25.83414 30.12641
## Nov 2023 27.98027 26.56210 29.39845 25.81136 30.14919
## Dec 2023 27.98027 26.54736 29.41319 25.78882 30.17173
Correlogram Check
acf(df_timeseriesforecasts2$residuals, lag.max=20, na.action = na.pass)

Box.test(df_timeseriesforecasts2$residuals, lag=20, type="Ljung-Box")
##
## Box-Ljung test
##
## data: df_timeseriesforecasts2$residuals
## X-squared = 53.377, df = 20, p-value = 7.153e-05
pacf(df_timeseriesforecasts2$residuals, lag=20,na.action = na.pass)

plot.ts(df_timeseriesforecasts2$residuals)
