Skip to content
Back to formatted view

Raw Message

Message-ID: <CA03A1B22BB649A78571EBE14AE53040@VillejaMariaPC>
Date: 2011-12-19T09:12:06Z
From: Ville Iiskola
Subject: Mlogit missing value problem

Hi

After good advices i post this problem here again. Now the attached sambledata is in csv form and it is a part of my real data. I have tried different na.action operations but the result stays the same...

My code

> library(mlogit)
> library(foreign)
> z<-odbcConnectExcel("D:\\SAMBLEDATA.csv")
> y<-sqlFetch(z,"Taul1")
> x=mlogit.data(y,choice="voittaja",shape="long",id.var="id",alt.var="numero")
> summary(mlogit(voittaja ~ Fa+Ie -1 , data=x, na.action=na.pass))

Error in if (abs(x - oldx) < ftol) { :
missing value where TRUE/FALSE needed

The reason for this error is in the row 563. There the choice has value 1 
and Ie has missing value. 
If the choice has value 0 and Ie has missing values, then there is no errors.

What should i do to make it work..?

Ville