From: ghpow1 <ghpow1_at_student.monash.edu.au>

Date: Sun, 17 Apr 2011 04:45:46 -0700 (PDT)

**TRUE,"110","19",1,"5"
**

**TRUE,"110","19",2,"6"
**

**FALSE,"110","149",4,"0"
**

**FALSE,"110","149",4,"1"
**

**TRUE,"110","149",4,"2"
**
...

Date: Sun, 17 Apr 2011 04:45:46 -0700 (PDT)

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"

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"

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"

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_at_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.Received on Sun 17 Apr 2011 - 21:03:19 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Sun 17 Apr 2011 - 21:10:30 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*