Question
Visualizing residual forecasts Like we have done throughout the course, we should visualize what these forecasts look like. Instructions 100 XP Convert your forecast into
Visualizing residual forecasts Like we have done throughout the course, we should visualize what these forecasts look like. Instructions 100 XP Convert your forecast into an xts object. Use the dates_valid object code provided to help with the creation of the xts object. Plot your forecast. # Convert your forecasts into an xts object dates_valid <- seq(as.Date("2017-01-01"), length = 22, by = "weeks") for_MET_hi_arima <- xts(___$___, order.by = ___) # Plot the forecast Using average historical proportions Now that you have a regional sales forecast for the metropolitan region we can distribute this forecast down. First, let's try distributing it down using the average historical proportion technique. Your forecast is saved as for_MET_t_xts, your sales objects are MET_hi, MET_lo, MET_sp, and MET_total, and you have three validation data sets called MET_hi_v, MET_lo_v, and MET_sp_v. Instructions 2/3 30 XP 2 3 Use these proportions to distribute out your forecast for the region into each product's sales forecast. # Calculate the average historical proportions prop_hi <- mean(MET_hi/MET_total) prop_lo <- mean(MET_lo/MET_total) prop_sp <- mean(MET_sp/MET_total) Build time series forecast for new region So you have built models forcasting sales for the metropolitan region in your lessons and the mountain region in the videos. Let's build a middle-out forecast for the southeast coastal region and then we will have completed the whole state's hierarchy! In your workspace you have SEC_total for sales and dates_validand SEC_t_v for validation. Instructions 100 XP Build a time series model for the southeast coastal regional sales. Forecast out 22 values into 2017. Make this forecast an xts object. Calculate the MAPE. # Build a time series model for the region SEC_t_model_arima <- auto.arima(SEC_total) # Forecast the time series model for_SEC_t <- forecast(SEC_t_model_arima, h = 22) # Make into an xts object for_SEC_t_xts <- xts(for_SEC_t$mean, order.by = dates_valid) # Calculate the MAPE MAPE <- mape(for_SEC_t_xts, SEC_t_v) print(MAPE) Top-down forecast for new region Let's get top-down forecasts for each of the products in the southeast coastal region. There are two products - a high value and low value. You have the following objects for sales SEC_hi, SEC_lo, and SEC_total in your workspace. You also have SEC_hi_v and SEC_lo_v for validation. Instructions 2/3 30 XP 2 3 Distribute out the regional forecast for_SEC_t_xts into each products' forecast. # Calculate the average of historical proportions prop_hi <- mean(SEC_hi/SEC_total) prop_lo <- mean(SEC_lo/SEC_total) Bottom-up forecast for whole state Now that you have forecasts for each region you can use the bottom-up hierarchy to calculate a forecast for the whole state! Your regional forecasts are saved as for_SEC_t_xts, for_MET_t_xts, and for_M_t_xts. Instructions 100 XP Roll up all of your regional forecasts into a variable called for_state to forecast the whole state! Take Hint (-30 XP) # Calculate the state sales forecast: for_state for_state= for_SEC_t_xts + for_MET_t_xts + for_M_t_xts # See the forecasts for_state
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started