Eterogeneità nelle preferenze per altre caratteristiche

Choice Modeling for Marketing in R

Elea McDonnell Feit

Assistant Professor of Marketing, Drexel University

Un altro modo per codificare i fattori

Dummy coding (quello che abbiamo usato finora)

  seat4 seat5
2     0     0
4     1     0
5     0     1

Effects coding (meglio per modelli gerarchici)

   seat2  seat4
2      1      0
4      0      1
5     -1     -1
Choice Modeling for Marketing in R

Cambiare la codifica di un fattore

contrasts(sportscar$seat) <- contr.sum(levels(sportscar$seat))
dimnames(contrasts(sportscar$seat))[[2]] <- levels(sportscar$seat)[1:2]
contrasts(sportscar$seat)
   2  4
2  1  0
4  0  1
5 -1 -1
Choice Modeling for Marketing in R

Rendere eterogenei tutti i coefficienti

my_rpar <- c("n", "n", "n", "n", "n")

m3 <- mlogit(choice ~ 0 + seat + trans + convert + price, data = sportscar) names(my_rpar) <- names(m3$coefficients)
my_rpar
      seat2       seat4 transmanual  convertyes       price 
        "n"         "n"         "n"         "n"         "n"
m8 <- mlogit(choice ~ 0 + seat + trans + convert + price, 
             data = sportscar, 
             panel = TRUE, rpar = my_rpar)
Choice Modeling for Marketing in R

Parametri del modello gerarchico

m8 <- mlogit(choice ~ 0 + seat + trans + convert + price, 
              data = sportscar, 
             panel = TRUE, rpar = my_rpar)
plot(m8, par = c("seat2", "seat4"))

distribuzioni dei parametri con effects coding

Choice Modeling for Marketing in R

Coefficiente per il livello base

m8$coef[1:2]
     seat2      seat4 
-0.1686077 -0.1912170 
-sum(m8$coef[1:2])
[1] 0.3598248
Choice Modeling for Marketing in R

Proviamo con i dati `chocolate`!

Choice Modeling for Marketing in R

Preparing Video For Download...