Dear all, I am trying to estimate an mlm with 8 alternatives, but I received the following error message:
Error in `colnames<-`(`*tmp*`, value = "disto.disto") : attempt to set colnames on object with less than two dimensions My data look like this: > head(dtb) votechoice disto.CVP disto.FDP disto.GPS disto.LPS disto.PBD disto.SP disto.SVP disto.VL risk 1 GPS 1.3797308 2.1734424 0.7447605 2.7584803 2.1036997 1.2393141 4.320573 0.7027443 9 2 SVP 1.6202692 0.8265576 3.7447605 0.2415197 0.8963003 4.2393141 1.320573 2.2972557 2 3 CVP 0.6202692 0.1734424 2.7447605 0.7584803 0.1036997 3.2393141 2.320573 1.2972557 3 4 SVP 4.6202692 3.8265576 6.7447605 3.2415197 3.8963003 7.2393141 1.679427 5.2972557 9 5 SVP 2.6202692 1.8265576 4.7447605 1.2415197 1.8963003 5.2393141 0.320573 3.2972557 6 6 GPS 2.3797308 3.1734424 0.2552395 3.7584803 3.1036997 0.2393141 5.320573 1.7027443 4 When I estimate a simple logit model it is working: rpl2 <- mlogit(votechoice ~ disto | risk,data=newdtb, shape = 'wide',varying=2:9, correlation=T, halton = NA,R = 10, tol = 10, print.level = 0);summary(rpl2) but when I am trying to estimate an mlm, I get the following: > rpl2 <- mlogit(votechoice ~ disto | risk,data=newdtb, shape = > 'wide',varying=2:9,correlation=T, + rpar=c(disto='l'),halton = NA,R = 10, tol = 10, print.level = 2) Error in `colnames<-`(`*tmp*`, value = "disto.disto") : attempt to set colnames on object with less than two dimensions I would be grateful for any help, thanks for reading this post. danielle -- View this message in context: http://r.789695.n4.nabble.com/error-in-mixed-logit-model-using-mlogit-function-tp4690489.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.