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

Price as a factor

As I mentioned in the last video, you can treat price as a factor. Let's estimate a model like that. The chocolate data is already loaded.

Bu egzersiz

Choice Modeling for Marketing in R

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

Egzersiz talimatları

  • Change the Price variable to a factor in the chocolate data.
  • Call mlogit to fit a model with the formula Selection ~ 0 + Brand + Type + Price with the chocolate data and assign it to choc_m3.
  • Use summary() to inspect the model coefficients.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# change the Price variable to a factor in the chocolate data


# fit a model with mlogit and assign it to choc_m3


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