我的問題相當直接瞭解,但我無法找到解決方案。McFadden R^2和似然比測試未在mLogit中顯示R
我使用mLogit庫使用以下代碼中R:
library("mlogit")
dat = read.csv("ExpeData.csv", header = TRUE)
ExpData<- mlogit.data(dat,shape="wide", varying = 3:14, choice = "Choice",sep=".")
wrf<- mlogit(Choice ~ price+distance+inveh+onoff+prob|0, ExpData)
summary(wrf)
輸出I得到的是以下內容:
Call:
mlogit(formula = Choice ~ price + distance + inveh + onoff +
prob | 0 , data = ExpData, method = "nr", print.level = 0)
Frequencies of alternatives:
alt1 alt2
0.51431 0.48569
nr method
4 iterations, 0h:0m:0s
g''(-H)^-1g = 1.55E-07
gradient close to zero
Coefficients :
Estimate Std. Error t-value Pr(>|t|)
price -7.3472e-01 3.1842e-02 -23.0735 < 2.2e-16 ***
distance -5.8012e-04 6.6842e-05 -8.6790 < 2.2e-16 ***
inveh -1.0994e-02 4.5466e-03 -2.4180 0.0156048 *
onoff 1.1858e-01 3.4718e-02 3.4157 0.0006363 ***
prob 5.6877e-01 8.2690e-02 6.8784 6.053e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Log-Likelihood: -2912.3
我想獲得的麥克法登和似然比測試
什麼是錯?
輕軌需要兩種車型。你可以建立一個空模型並運行'lrtest'。要找到McFadden測試,你只需要用'??「McFadden」'在R控制檯上搜索 – 2014-11-23 16:09:19