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" <[email protected]> 
> Odeslal: [email protected]
> 
> 18.12.2011 15:06
> 
> Komu
> 
> <[email protected]>
> 
> 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?
> 
> 
> 
> 
> ______________________________________________
> [email protected] 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.

______________________________________________
[email protected] 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