Hi Thanks to Jeremy for his response...
I have been able to generate the factors and generate mlogit data using his code: mldata<-mlogit.data(mydata, varying=NULL, choice="pitch_type_1", shape="wide") my mlogit data looks like: "dependent_var","A variable","B Var","chid","alt" FALSE,"110","19",1,"0" FALSE,"110","19",1,"1" FALSE,"110","19",1,"2" FALSE,"110","19",1,"3" FALSE,"110","19",1,"4" TRUE,"110","19",1,"5" FALSE,"110","19",1,"6" FALSE,"110","19",1,"7" FALSE,"110","19",1,"8" FALSE,"110","19",2,"0" FALSE,"110","19",2,"1" FALSE,"110","19",2,"2" FALSE,"110","19",2,"3" FALSE,"110","19",2,"4" FALSE,"110","19",2,"5" TRUE,"110","19",2,"6" FALSE,"110","19",2,"7" FALSE,"110","19",2,"8" TRUE,"110","561",3,"0" FALSE,"110","561",3,"1" FALSE,"110","561",3,"2" FALSE,"110","561",3,"3" FALSE,"110","561",3,"4" FALSE,"110","561",3,"5" FALSE,"110","561",3,"6" FALSE,"110","561",3,"7" FALSE,"110","561",3,"8" FALSE,"110","149",4,"0" FALSE,"110","149",4,"1" TRUE,"110","149",4,"2" ... The mldata contains 651431 rows. If I try to run this full data set I get the following error: > mlogit.model<- mlogit(dependent_var~0|A+B, data = mldata, reflevel="0") Error in model.matrix.default(formula, data) : allocMatrix: too many elements specified Calls: mlogit ... model.matrix.mFormula -> model.matrix -> model.matrix.default Execution halted Smaller datasets (595 mldata rows) and mlogit works fine and generates regression output. Is there a problem with mlogit and huge datasets? I suppose this is perhaps not the best way to assess this kind of data, but I am trying to replicate a previous analysis that was completed on a similar amount of similar data. -- View this message in context: http://r.789695.n4.nabble.com/Multinomial-Logit-Model-with-lots-of-Dummy-Variables-tp3439492p3455345.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.