Calculate bottom-up forecast for whole region
Perfect! Now you have a forecast for the high value product in the metropolitan region in the object pred_MET_hi_xts
(the regression was the best) and a forecast for the specialty product in the object for_MET_sp_en
(the ensemble was the best). I have also forecasting the low value product in the region for you and the forecast is in the object pred_MET_lo_xts
(the regression was the best). Now you can build a bottom-up forecast of the whole metropolitan region!
This exercise is part of the course
Forecasting Product Demand in R
Exercise instructions
- Add the three forecasts of each product defined above to build the whole region sales forecast.
- Calculate the MAPE of this total forecast compared to the validation data set
MET_t_v
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Calculate the metropolitan regional sales forecast
for_MET_total <- ___ + ___ + ___
# Calculate a validation data set
MET_t_v <- bev_xts_valid[,"MET.hi"] + bev_xts_valid[,"MET.lo"] + bev_xts_valid[,"MET.sp"]
# Calculate the MAPE
MAPE <- mape(___, ___)
print(MAPE)