Discrete Choice Example - Conditional Logit

Conditional Logit Example

This conditionalLogit example uses Powers and Xie (2000) categorical data. The independent data, mode, measures mode of transportation choice: train, bus, or car. It also includes several attributes of these categories: terminal waiting time (ttme), in vehicle choice (invc), in vehicle time (invt), and generalized cost (GC). The first step to performing analysis is to load the data:
library dc;

//Load Data
loadm y = powersxie_mat;
Once this data is loaded, estimation features are specified using the dcControl structure. This structure must be declared then initialized using the dcControlCreate procedure:
//Step One: dcControl structure
//Declare dcControl structure
struct dcControl dcCt;

//Initialize dcControl structure 
dcCt = dcControlCreate();
Prior to estimation, the dcSet procedures are used to setup model parameters and data:
//Step Two: Describe data 
//Dependent variable

//Category Labels

//Attribute variables 
Next, the dcOut structure is declared:
//Step Three: Declare dcOut structure 
struct dcout dcout1;
Finally, calling the conditionalLogit procedure estimates the model and results are reported using the printDCOut procedure:
//Step Four: Call conditionalLogit 
dcout1 = conditionalLogit(dcCt);

//Print Results
call printDCOut(dcout1);
The printDCOut procedure prints a model and data summary to the output screen:
Conditional Logit Results

Number of Observations:   152
Degrees of Freedom:       148

  1 - train
  2 - bus
  3 - car

Distribution Among Outcome Categories For mode 

Dependent Variable       Proportion  
train                     0.4145     
bus                       0.1974     
car                       0.3882
In addition, coefficient estimates, odds ratios, and marginal effects are printed: Finally, the example also returns a number of summary statistics for model diagnostics:

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 30 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy