1. Learn
  2. /
  3. Courses
  4. /
  5. Forecasting Product Demand in R

Exercise

Create future predictor variables

To get forecasts for the regression models with price, holidays, and promotions we need future values for each of these inputs! For our high end product we previously determined holidays and promotions aren't important to the model. Prices are negotiated 6 months in advance, so the prices in the validation data set are reasonable to use for forecast calculations. Your validation data set is stored in your workspace as bev_xts_valid.

Instructions

100 XP
  • Store the log of the prices (stored as the variable MET.hi.p) from your validation data set as a vector using as.vector().
  • Create a validation data frame using l_MET_hi_p_valid and set the column names using the provided code.