Exercise

Calculating price elasticity

Now that you know about price elasticities, let's see how elastic prices are for the high end product in the metropolitan region! Grand training and validation data sets have already been created for you and are stored in the objects bev_xts_train and bev_xts_valid.

You already have the sales for the high end product loaded in the workspace as MET_hi. You first need to extract the prices out of the bev_xts_train object. The column names for prices in the bev_xts_train object is MET.hi.p.

Instructions

100 XP
  • Save the log of the prices for the high end product (MET.hi.p) as a vector.
  • Load the log of the sales and log of prices in a data frame.
  • Build regression model predicting the log of sales with the log of prices.