"system is computationally singular" mlogit R 包中的错误

"system is computationally singular" error in mlogit R-package

我想使用多项逻辑回归解决我的问题,mlogit R 包。

当我运行下面的代码时,

ml.data <- mlogit.data(dat, shape = "wide", choice = "Resp")
mlogit(Resp ~ A + B+ C+ D, ml.data)

我收到此错误:"system is computationally singular"。 我看到了 this post,但没有帮助。 如果有人能帮助我,我将不胜感激。

mlogit 不遵循与其他模型相同的模型命令行公式。

尝试

mlogit(Resp ~ 1|A+B+C+D , ml.data)

并比较

multinom(Resp ~ A+B+C+D , dat)

在包 nnet 中。另外,查看 ?mFormulathis answer