MulaiMulai sekarang secara gratis

Fitting a choice model

Next, you will estimate a choice model using the mlogit() function from the mlogit package with the data in sportscar. The data has already been loaded. The process is very similar to fitting a regression model with lm().

Latihan ini adalah bagian dari kursus

Choice Modeling for Marketing in R

Lihat Kursus

Petunjuk latihan

  • Load the mlogit package using library().
  • Fit a model to predict choice as a function of seat, trans, convert and price. You will need to fill in the formula input.
  • Summarize the m1 object.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# load the mlogit library 


# fit a choice model using mlogit() and assign the output to m1
m1 <- mlogit(___ ~ ___, data=sportscar)

# summarize the m1 object to see the output of the choice model
Edit dan Jalankan Kode