[R] How to create design matrix for LLMNL?

Tetyana Stepanchuk stepanchuk at wiwi.uni-frankfurt.de
Fri Aug 19 14:24:25 CEST 2005


Hello, 

 

I have a small problem with developing design matrix X, which I use in
estimation the log-likelihood of a multinomial logit model.

 

I have the data: 

 number of observation - 289

number of choice alternative- 3

number of choice specific variables in matrix X -4

matrix X =289x4

I tried to use the function createX, I know that I have to get design matrix
289x12 (am I right?) but it always says "bad dim" (my code and data in
attachment)

 

Where is my fault? Can I use another method in order to create design
matrix? 

Or need it at all here in logmnl (see code in attachment)?

 

Can anyone help me with this issue?

 

Thanks in advance,

Tatyana

 

 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: createX.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050819/0f1fb3ae/createX.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: logmnl.txt
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20050819/0f1fb3ae/logmnl.txt


More information about the R-help mailing list