My problem is rather straightforward to understand but I was not able to find a solution.
I am using the following code in R using the mLogit library:
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)
The output I get is the following:
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
I would like to get the McFadden and Likelihood ratio test
What is wrong??
To answer my own questions, it was not that I did not understand the usage of MC Fadden R^2 or the test. My issue was that the R^2 was not presented in the model summary.
My R version was 2.*. Lately I upgraded my computer and got the 3.1.3 version which solved my problems. Now the results of the model summary include:
Log-Likelihood: -7205.8 McFadden R^2: 0.067533 Likelihood ratio test : chisq = 1043.7 (p.value = < 2.22e-16)
and I don't have to estimate the R^2 by hand.