Session Ready
Exercise

Predict shares for chocolate bars

Suppose a store plans to carry Ghiradelli chocolate in all 5 types. What will the shares be between these five chocolates? The store may want to know this so that they can plan their inventory or re-arrange the display to feature the most popular chocolate types.

The chocolate dataset is pre-loaded for you as an mlogit.data object.

Instructions
100 XP
  • Fit the choc_m2 model using mlogit. The first input should be the formula Selection ~ 0 + Brand + Type + Price and the second should be data = chocolate.
  • Create a data frame that includes 5 chocolate bars that are all Ghirardelli and all priced at $3. The types should be the five types that were tested in the chocolate data. I've started the code for you. You just need to finish defining the prices.
  • Predict shares using my predict_mnl() function, which is already loaded.