Forecasting Product Demand in R
Aric LaBarr, Ph.D.
Senior Data Scientist, Elder Research
Auto Regressive Models
Integrated
Moving Average
How long does this dependence last?
Stationarity
Typically used to remove trend...
$$ Y_{t} - Y_{t-1} $$
... or seasonality
$$ Y_{t} - Y_{t-12} $$
M_t <- bev_xts[,"M.hi"] + bev_xts[,"M.lo"]
M_t_train <- M_t[index(M_t) < "2017-01-01"]
M_t_valid <- M_t[index(M_t) >= "2017-01-01"]
auto.arima(M_t_train)
Series: M_t_train
ARIMA(4,0,1) with non-zero mean
Coefficients:
ar1 ar2 ar3 ar4 ma1 mean
1.3158 -0.5841 0.1546 0.0290 -0.6285 2037.5977
s.e. 0.3199 0.2562 0.1534 0.1165 0.3089 87.5028
sigma^2 estimated as 67471: log likelihood=-1072.02
AIC=2158.05 AICc=2158.81 BIC=2179.31
Forecasting Product Demand in R