Professional Documents
Culture Documents
Multi No Mial Log It
Multi No Mial Log It
cbc.df<-read.csv("https://r-marketing.r-forge.r-project.org/data/rintro-
chapter13conjoint.csv")
str(cbc.df)
cbc.df$seat<-as.factor(cbc.df$seat)
summary(cbc.df)
## price
## 30 35 40
## 1486 956 558
# We now study customer choice behavior using the multinomial logit model.
# Below is some data set up for mlogit:
# install.packages("mlogit")
library(mlogit)
##
## Call:
## mlogit(formula = choice ~ seat + cargo + eng + price, data = cbc.mlogit,
## method = "nr")
##
## Frequencies of alternatives:choice
## 1 2 3
## 0.32700 0.33467 0.33833
##
## nr method
## 5 iterations, 0h:0m:0s
## g'(-H)^-1g = 8.01E-05
## successive function values within tolerance limits
##
## Coefficients :
## Estimate Std. Error z-value Pr(>|z|)
## (Intercept):2 0.0289278 0.0512669 0.5643 0.5726
## (Intercept):3 0.0417852 0.0513660 0.8135 0.4159
## seat7 -0.5346380 0.0623610 -8.5733 < 2.2e-16 ***
## seat8 -0.3046051 0.0611538 -4.9810 6.327e-07 ***
## cargo3ft 0.4769506 0.0508739 9.3752 < 2.2e-16 ***
## enggas 1.5278103 0.0674137 22.6632 < 2.2e-16 ***
## enghyb 0.7168514 0.0655213 10.9407 < 2.2e-16 ***
## price -0.1734026 0.0069419 -24.9791 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Log-Likelihood: -2581.7
## McFadden R^2: 0.2166
## Likelihood ratio test : chisq = 1427.7 (p.value = < 2.22e-16)
lrtest(m1, m2)
# The likelihood ratio test suggests we don't need the alternate specific
constants to fit the present data (p-value = 0.7122 > 0.05)
# 2. Willingness to pay
coef(m2)
1000*(coef(m2)/-coef(m2)[6])