On 2010-03-07 10:41, cmc wrote:
I have tried doing it whithout attaching the mydata file, and i still get the same output. When i create mldata using mlogit.data i do not generate the chid and alt columns, is this where the problem is, if so how do i fix this problem.
I've suggested not naming the mlogit.data object 'mldata'. That will work. Another way is to let mlogit() do the data conversion itself: Instead of mldata<-mlogit.data(mydata, varying=NULL, choice="brand", shape="wide") mlogit.model<- mlogit(brand~1|female+age, data = mldata, reflevel="1") use mlogit.model <- mlogit(brand~1|female+age, data = mydata, ## note: 'mydata', not 'mldata' reflevel = "1", varying = NULL, choice = "brand", shape = "wide") -Peter Ehlers
Cheers for any help
-- Peter Ehlers University of Calgary ______________________________________________ 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.