Yong,
I saw your post from April 29th about the error message in the mlogit
package, copied below. I had the same problem, but solved it by omitting
all missing data from my data frame before running mlogit.data().
ex. mydata = na.omit(mydata)
I am posting this to the R help list as well so that an answer to this
question will be documented.
Andrew Miles
I am using the mlogit packages and get a data problem, for which I can't
find any clue from R archive.
code below shows my related code all the way to the error
*
#---------------------------------------------------------------------------
*
mydata <- data.frame(dependent,x,y,z)
mydata$dependent<-as.factor(mydata$dependent)
mldata<-mlogit.data(mydata, varying=NULL, choice="dependent", shape="wide")
summary(mlogit.1<- mlogit(dependent~1|x+y+z, data = mldata, reflevel="0"))
"Error in X[omitlines, ] <- NA : subscript out of bounds" ,
*
#---------------------------------------------------------------------------
*
Could anybody kindly tip how can I possibly solve this problem?
Thank you
yong
[[alternative HTML version deleted]]
______________________________________________
[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.