拟合并解读选择模型

R 中的营销选择建模

Elea McDonnell Feit

Assistant Professor of Marketing, Drexel University

使用 lm() 拟合线性模型

拟合线性回归模型:

my_model <- lm(y ~ x1 + x2 + x3, data = lm_data)
summary(my_model)

lm_data 数据框

y x1 x2 x3
3 2 7 2
1 1 7 8
3 2 4 6
R 中的营销选择建模
library(mlogit)
mymodel <- mlogit(choice ~ feature1 + feature2 + feature3, 
                  data = choice_data)

choice_data

ques alt choice feature1 feature2 feature3
1 1 1 low high low
1 2 0 low high high
1 3 0 high high low
2 1 0 high low high
2 2 1 high high low
2 3 0 low low low
R 中的营销选择建模

mlogit() 模型对象摘要

summary(mymodel)
...

Coefficients :
                Estimate Std. Error  t-value  Pr(>|t|)    
feature1low    -0.0322059  0.0740839  -0.4347    0.6638    
feature2low     0.4546283  0.0727445   6.2497 4.114e-10 ***
feature3low    -1.2926911  0.0648649 -19.9290 < 2.2e-16 ***

Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
...
R 中的营销选择建模

让我们来了解人们如何评价跑车的各项特征。

R 中的营销选择建模

Preparing Video For Download...