Hi

Without knowing details about mlogit and without any data from your side 
to check I guess that you shall put

na.omit or na.exclude instead of na.pass to na.action

Regards
Petr

> "Ville Iiskola" <ville.iisk...@uta.fi> 
> Odeslal: r-help-boun...@r-project.org
> 
> 18.12.2011 15:06
> 
> Komu
> 
> <r-help@r-project.org>
> 
> Kopie
> 
> Předmět
> 
> [R] Dealing with NAs
> 
> Hi
> 
> I am trying to estimate parameter values with mlogit. I attach a part of 
my data.
> 
> My code is
> 
> 
x=mlogit.data(y,choice="voittaja",shape="long",id.var="id",alt.var="numero")
> 
> summary(mlogit(voittaja  ~ Ie-1 , data=x, na.action=na.pass))
> 
> 
> 
> But i get 
> 
> 
> 
> Error in if (abs(x - oldx) < ftol) { : 
>   missing value where TRUE/FALSE needed
> 
> 
> Because there is Na in D2. 
> 
> What should i do to make it work?
> 
> 
> 
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to