The BCHOICE Procedure

Example 27.2 Nested Logit Modeling

The standard logit model imposes the restriction of the independence from irrelevant alternatives (IIA) property, which implies proportional substitution across alternatives. When the IIA assumption does not hold, models with more flexibility are needed.

One of the most widely used models is called the nested logit. In a nested logit model, all the alternatives in a choice set can be partitioned into nests in such a way that the following conditions are true:

  • The ratio of any two alternatives that are in the same nest is independent of the existence of all other alternatives. Hence, the IIA assumption holds within each nest.

  • The ratio of any two alternatives that are in different nests is not independent of the existence of other alternatives in the two nests. Hence, the IIA assumption does not hold between different nests.

For more information about nested logit models, see the section Nested Logit.

In the previous example of travel demand data, people are asked to choose among travel by auto, plane, or public transit. It seems that auto and public transit are more similar to each other than either of them are to plane, because the probability of choosing auto and public transit might rise by about the same proportion whenever the option of taking a plane is unavailable. A nested logit model that places auto and public transit in one nest and plane in another nest might seem more reasonable than the standard logit model.

You specify a nested logit model by using the TYPE =NLOGIT option, and you allocate the nests by using the NEST = option. In the following code, NEST =(1 2 1) implies that travel alternatives 1 (auto) and 3 (public transit) are in the first nest and travel alternative 2 (plane) is in the second nest. There are two nests in total.

The deviance information criterion (DIC ) is used to select the model. The "Deviance Information Criterion" table (ODS table name DIC) contains the DIC of the model. The table is not displayed by default, but you can request it by specifying the DIC option in the PROC BCHOICE statement. For more information about the calculations, see the section Deviance Information Criterion (DIC). The DIC option requests the calculation of DIC.

proc bchoice data=Travel2 seed=124 nmc=20000 nthin=2 dic;
   class Mode Subject / param=ref order=data;
   model Choice = Mode TravTime / choiceset=(Subject) type=nlogit nest=(1 2 1);
run;

Output 27.2.1: PROC BCHOICE Posterior Summary Statistics and DIC

The BCHOICE Procedure

Posterior Summaries and Intervals
Parameter N Mean Standard
Deviation
95% HPD Interval
Mode Auto 10000 -0.2398 0.6574 -1.5032 1.1475
Mode Plane 10000 -2.0295 1.1816 -4.2724 0.3157
TravTime 10000 -0.5638 0.2042 -0.9638 -0.1872
Lambda 1 10000 0.8884 0.3540 0.2338 1.5334

Deviance Information Criterion
Dbar (Posterior Mean of Deviance) 32.946
Dmean (Deviance Evaluated at Posterior Mean) 30.311
pD (Effective Number of Parameters) 2.635
DIC (Smaller is Better) 35.581



There are two alternatives in the first nest and one alternative in the second nest. A nest that has only one alternative is degenerate; therefore its $\lambda $ is not estimable. This explains why there is only one $\lambda $ estimate in the output.

The following statements revisit the standard logit model (the default type) that is discussed in the previous example and request that the calculation of DIC be displayed:

proc bchoice data=Travel2 seed=124 nmc=20000 nthin=2 dic;
   class Mode Subject / param=ref order=data;
   model Choice = Mode TravTime / choiceset=(Subject);
run;

Output 27.2.2: PROC BCHOICE Posterior Summary Statistics and DIC

The BCHOICE Procedure

Posterior Summaries and Intervals
Parameter N Mean Standard
Deviation
95% HPD Interval
Mode Auto 10000 -0.1999 0.7341 -1.6891 1.1612
Mode Plane 10000 -2.0470 1.3376 -4.6183 0.5479
TravTime 10000 -0.6000 0.2333 -1.0716 -0.1986

Deviance Information Criterion
Dbar (Posterior Mean of Deviance) 33.356
Dmean (Deviance Evaluated at Posterior Mean) 30.550
pD (Effective Number of Parameters) 2.806
DIC (Smaller is Better) 36.161



The DIC values are very close. A smaller DIC value indicates a better fit to the data; hence, the nested logit model might be a little better.