1

我正在使用 mlogit 分析来自鞋子购买习惯调查的陈述偏好数据。我目前正在运行以下代码:

library("mlogit") 

Running <- read.csv(file="DiscreteChoiceDatav3.csv", head=TRUE, sep=",")

RS <- mlogit.data(Running, choice="Selected", shape="long", alt.levels=c("1", "2", "3", "4"), id.var="ResponseID", varying=NULL)

m1 <- mlogit(Selected ~ Brand + Cushioning + Fit + LnPrice + EXP_Weight | 0 | 0, data=RS)  

summary(m1)

这是产生这些结果,我很满意:

Call:
mlogit(formula = Selected ~ Brand + Cushioning + Fit + LnPrice + 
    EXP_Weight | 0 | 0, data = RS, method = "nr", print.level = 0)

Frequencies of alternatives:
      1       2       3       4 
0.26859 0.24571 0.24142 0.24428 

nr method
4 iterations, 0h:0m:1s 
g'(-H)^-1g = 6.77E-08 
gradient close to zero 

Coefficients :
                      Estimate Std. Error  t-value  Pr(>|t|)    
BrandAAA            -0.4072202  0.0559660  -7.2762 3.433e-13 ***
BrandBBB            -0.5661727  0.0634774  -8.9193 < 2.2e-16 ***
BrandCCC            -0.9346379  0.0575556 -16.2389 < 2.2e-16 ***
BrandDDD            -0.6891785  0.0600212 -11.4823 < 2.2e-16 ***
CushioningModerate   0.7806761  0.0535750  14.5716 < 2.2e-16 ***
CushioningSoft       0.4684838  0.0568556   8.2399 2.220e-16 ***
CushioningVery Soft  0.2816491  0.0727461   3.8717 0.0001081 ***
FitSnug              0.5565443  0.0469520  11.8535 < 2.2e-16 ***
FitTight             0.0280130  0.0509774   0.5495 0.5826506    
LnPrice             -0.3744333  0.0760356  -4.9245 8.460e-07 ***
EXP_Weight          -0.0214945  0.0015584 -13.7927 < 2.2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Log-Likelihood: -5316.9

我现在想使用我之前掌握的有关受访者的人口统计数据将样本分为三个健身类别(低/中/高)。我试图通过创建新的细分品牌变量和新的虚拟变量来做到这一点,如下表所示:

在此处输入图像描述

但是,如果我尝试运行旨在帮助调查品牌价值等因素如何随受访者适应度变化的最简单模型,则会出现“计算奇异”错误:

> m1 <- mlogit(Selected ~ Brand + Brand_Medium | 0 | 0, data=RS)  
Error in solve.default(H, g[!fixed]) : 
  system is computationally singular: reciprocal condition number = 1.09477e-17
> m1 <- mlogit(Selected ~ Brand_Medium | 0 | 0, data=RS)  
Error in solve.default(H, g[!fixed]) : 
  system is computationally singular: reciprocal condition number = 1.06423e-17

有人对我哪里出错有任何想法吗?非常感谢。

4

0 回答 0