How to implement an Absolute Hierarchical (Nested) Logit Model with XCHOICE


The XCHOICE command implements logit choice models within the Matrix program, based on either generalized costs or utilities.

Hierarchical models group related choices together in nests (or hierarchies). 

In an absolute model, the choice probabilities are calculated by starting at the bottom of the tree and moving up the hierarchy, calculating the choice probabilities and the composite cost or utility in each nest. A scale parameter must be associated to each nest.

A simple example is provided in the below application:

communities.bentley.com/.../ex_5F00_xChoice_5F00_nested.zip

The structure of the mode choice in this example is shown below:

In this example:

In this model the process begins in the PT nest, and then we move up the hierarchy.

The example has four zones, and the inputs are the cost matrices and total demand matrix ("all trips") to be split.

The cost matrices are shown in the image below:

In this example, we used the two scale parameters below:

The syntax for this nested model, using the XCHOICE control statement is the below:

XCHOICE,
;     List choices
  ALTERNATIVES = car bus rail,
;     Input demand
  DEMANDMW = 1,
;     Input costs
  COSTSMW = 4, 5, 6,
;     Output calculated demand
  ODEMANDMW = 14, 15, 16,
;    Model Structure
;      Top level nest model specification
  SPLIT = TOTAL lambda car pt,
;     Forecast composite cost top level
  SPLITCOMP = 19,
;      PT nest model specification
  SPLIT = PT mu bus rail,
;     Output calculated composite cost PT nest
  SPLITCOMP = 20,
;    Working matrices
  STARTMW =70

The excel file within the zip folder reproduces the calculations and provide the same results as the CUBE script.