BaşlayınÜcretsiz Başlayın

The effect of multiple dummies on sales

The brewery also distributed manufacturer coupons, offering price reductions for Hoppiness. A third marketing strategy was to combine display and coupon activity to increase volume sales.

This time, you will calculate the mean of log(SALES) for each DISPLAY, COUPON, and DISPLAYCOUPON level combination by using the function aggregate(). You can do this by successively adding the variables to the formula argument.

To describe the effects of coupon and display activity, you again estimate a linear response model by using the function lm(). As usual, you investigate the coefficients.

Bu egzersiz

Building Response Models in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Calculate the mean of log(SALES) for each DISPLAY, COUPON, and DISPLAYCOUPON level combination.
  • Explain log(SALES) by DISPLAY, COUPON, and DISPLAYCOUPON. Use the function lm() and assign the result again to an object called dummy.model.
  • Obtain the coefficients of the dummy.model by using the function coef().

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Mean log(SALES)
___(___ ~ ___ + ___ + ___, FUN = ___, data = sales.data)

# Explain log(SALES) by DISPLAY, COUPON and DISPLAYCOUPON
dummy.model <- ___(___ ~ ___ + ___ + ___, data = sales.data)

# Obtain the coefficients
Kodu Düzenle ve Çalıştır