[Limdep Nlogit List] questions about NLOGIT when the model has variable number of choices

Xie, Xiaoqing Kristine xkx2 at cornell.edu
Wed May 7 11:15:58 EST 2008


Hi,

It is a follow up of my last email.

I am using NLOGIT 4.0 to do a discrete choice model project.  It is actually a multinomial logit model.  The data that I am working on is with variable number choices (instead of fixed nunmber of choices).  To be more specific, I need to define a "universal choice set". 

Anyway, I did the coding, but it did not run through.  So I am looking for a sample code (command file) with corresponding data file with variable number of choices.  If you have them, please email them to me.

Or if you can tell me what wrong was with my code, it is great too!

And here is code that I was trying to run:
 
Read; File = D:\nlogit\dc_hotwire4.txt;
Nrec=197; Nvar = 24;
Names = id, price, distance, decision, duration, vn1, vn2, vn3, vn4, vn5, vn6, vn7, vn8, vn9, vn10, vs1, vs2, vs3, vs4, vs5, vs6, rank, nij, altij$
Nlogit
; Lhs = decision, nij, altij
; Choices = c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33,c34,c35,c36,c37,c38,c39,c40,c41,c42,c43,c44
; Rhs = price, distance, vn1, vn2, vn3, vn4, vn5, vn6, vn7, vn8, vn9, vn10, vs1, vs2, vs3, vs4, vs5, vs6, rank
; CheckData
; Show model 
; Describe 
; List $

 

Here are the error messages:

 Discrete choice and multinomial logit models|
+---------------------------------------------+
+----------------------------------------------------------+
| Inspecting the data set before estimation.               |
| These errors mark observations which will be skipped.    |
| Row Individual = 1st row then group number of data block |
+----------------------------------------------------------+
    0      1  Universal choice set. LHS variable is < 0 or > no. of alts.
   35      2  Universal choice set. LHS variable is < 0 or > no. of alts.
   72      3  Universal choice set. LHS variable is < 0 or > no. of alts.
  103      4  Universal choice set. LHS variable is < 0 or > no. of alts.
  137      5  Universal choice set. LHS variable is < 0 or > no. of alts.
  174      6  Universal choice set. LHS variable is < 0 or > no. of alts.

  Error  1022: Insufficient valid observations to fit a model
  Error  1022: Insufficient valid observations to fit a model

 

Thanks a lot,

 

Kristine








More information about the Limdep mailing list