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

More lags

It might be interesting to learn if coupon actions only cause an immediate effect on sales or if the effect continues into the next period.

Again, you shift the COUPON predictor back by using the function lag(). The result is assigned to a new variable Coupon.lag. Both, the original COUPON and the Coupon.lag variables, are added to the log(SALES) ~ PRICE + Price.lag relationship by using the update() function.

Bu egzersiz

Building Response Models in R

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

Egzersiz talimatları

  • Create a lagged variable for COUPON named Coupon.lag.
  • Update the lag.model object for COUPON and Coupon.lag by using the function update().

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Take the lag of COUPON
Coupon.lag <- ___

# Update the model for COUPON and Coupon.lag
___(lag.model, . ~ . + ___ + ___)
Kodu Düzenle ve Çalıştır