R中的mlogit包:具有替代特定变量且不带截获
我是R新手,我正在尝试运行一个带有替代特定变量且没有截距的logit模型。我已经检查了文档,但是当我使用替代的特定变量运行模型时,似乎总是包含截取。谁能告诉我如何在没有拦截的情况下运行模型?谢谢 下面是我试过的。我在R中使用mlogit包中的数据集R中的mlogit包:具有替代特定变量且不带截获,r,mlogit,R,Mlogit,我是R新手,我正在尝试运行一个带有替代特定变量且没有截距的logit模型。我已经检查了文档,但是当我使用替代的特定变量运行模型时,似乎总是包含截取。谁能告诉我如何在没有拦截的情况下运行模型?谢谢 下面是我试过的。我在R中使用mlogit包中的数据集 m.fishing.1 <- mlogit(mode ~ price + catch | income, data = df.fishing, reflevel = "beach"); m.fishing.1在模型公式规范中使用+0来排除截距
m.fishing.1 <- mlogit(mode ~ price + catch | income, data = df.fishing, reflevel = "beach");
m.fishing.1在模型公式规范中使用+0来排除截距。从mlogit::mFormula()
的帮助中:
data("Fishing", package = "mlogit")
Fish <- mlogit.data(Fishing, varying = c(2:9), shape = "wide", choice =
"mode")
f3 <- mFormula(mode ~ price + catch | income + 0)
mlogit(f3,Fish)
> mlogit(f3,Fish)
Call:
mlogit(formula = mode ~ price + catch | income + 0, data = Fish, method = "nr")
Coefficients:
price catch income:boat income:charter income:pier
-2.1597e-02 7.1208e-01 2.1014e-04 2.4498e-04 3.1272e-05
>