Forecasting residuals

Forecasting Product Demand in R

Aric LaBarr, Ph.D.

Senior Data Scientist, Elder Research

Regression Pieces

Forecasting Product Demand in R

ARIMA on Residuals

M_hi_arima <- auto.arima(M_hi_full_res)

summary(M_hi_arima)
Series: M_hi_full_res 
ARIMA(2,0,1) with zero mean 

Coefficients:
         ar1      ar2      ma1
      1.0077  -0.5535  -0.4082
s.e.  0.1291   0.0800   0.1412

sigma^2 estimated as 0.01078:  log likelihood=131.45
AIC=-254.9   AICc=-254.63   BIC=-242.75
Forecasting Product Demand in R

Forecasting Residuals

for_M_hi_arima <- forecast(M_hi_arima, h = 22)

dates_valid <- seq(as.Date("2017-01-01"), length = 22, by = "weeks") for_M_hi_arima <- xts(for_M_hi_arima$mean, order.by = dates_valid)
head(for_M_hi_arima, n = 5)
                  [,1]
2017-01-01  0.13888498
2017-01-08 -0.09448731
2017-01-15 -0.17209098
2017-01-22 -0.12112306
2017-01-29 -0.02680729
Forecasting Product Demand in R

Visualizing Forecasted Residuals

plot(for_M_hi_arima)

Forecasting Product Demand in R

Let's practice!

Forecasting Product Demand in R

Preparing Video For Download...