[R] mlogit package, "Error in X[omitlines, ] <- NA : subscript out of bounds"
Yong Wang
wangyong1 at gmail.com
Fri Apr 29 20:29:08 CEST 2011
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
More information about the R-help
mailing list