[R] Mlogit dummy problem

Ville Iiskola ville.iiskola at uta.fi
Sun Oct 23 17:08:56 CEST 2011


Hi

I have tried to estimate  race  winning probabilities with mlogit in R. I have different amount of contestors in the races and mlogit has a bug so that in those situations the mlogit does not work. So i tried to add dummy contestors to the race so that every race has an equal amount of contestors. 
The problem is that the dummies infect the estimates.

In the attached excel file i have an examble of the situation. The first sheet has no dummies and the second sheet has the same information but dummies are added. When i run mlogit as followin

library(RODBC)

library(mlogit)

library(foreign)

z<-odbcConnectExcel("D:\\Testi2.xls")

y<-sqlFetch(z,"eidummyjä")

Mallidata=mlogit.data(y,choice="Voittaja",shape="long",id.var="Päiväjalähtö",alt.var="Kilpailunumero")

summary(mlogit(Voittaja  ~ Onkokaikkikengätpois + Onkoosakengistäjalassa+ OurChoicedummy +MvaiN+OvaiR+Log-1 , data=Mallidata))



Coefficients :
                         Estimate Std. Error t-value Pr(>|t|)
Onkokaikkikengätpois     -16.7722 25041.3517 -0.0007   0.9995
Onkoosakengistäjalassa    38.9587  8371.6220  0.0047   0.9963
OurChoicedummy            39.5846 26049.3329  0.0015   0.9988
MvaiN                    -41.4435 10733.2019 -0.0039   0.9969
OvaiR                     58.0948 11534.2609  0.0050   0.9960
Log                       -6.5563  4870.5160 -0.0013   0.9989

Log-Likelihood: -1.5546e-07



And the dummies run

Coefficients :
                         Estimate Std. Error t-value Pr(>|t|)
Onkokaikkikengätpois     -15.4053 31857.0476 -0.0005   0.9996
Onkoosakengistäjalassa    40.0112 17493.0896  0.0023   0.9982
OurChoicedummy            39.3606 34019.6023  0.0012   0.9991
MvaiN                    -40.4852 13794.8400 -0.0029   0.9977
OvaiR                     57.0165 14268.6747  0.0040   0.9968
Log                       -5.5429  9380.3919 -0.0006   0.9995

Log-Likelihood: -1.7162e-07

So the likelihoods are different and estimates also. 

How should i add the dummies or is there some other way of doing this...?

Ville 








More information about the R-help mailing list