MDC Procedure

Nested Logit Modeling

A more general model can be specified using the nested logit model.

Consider, for example, the following random utility function:

upper U Subscript i j Baseline equals x Subscript i j Baseline beta plus epsilon Subscript i j Baseline j equals 1 comma ellipsis comma 3

Suppose the set of all alternatives indexed by j is partitioned into K nests, upper B 1 comma ellipsis comma upper B Subscript upper K Baseline. The nested logit model is obtained by assuming that the error term in the utility function has the GEV cumulative distribution function

exp left-parenthesis minus sigma-summation Underscript k equals 1 Overscript upper K Endscripts left-parenthesis sigma-summation Underscript j element-of upper B Subscript k Baseline Endscripts exp left-brace minus epsilon Subscript i j Baseline slash lamda Subscript k Baseline right-brace right-parenthesis Superscript lamda Super Subscript k Superscript Baseline right-parenthesis

where lamda Subscript k is a measure of a degree of independence among the alternatives in nest k. When lamda Subscript k Baseline equals 1 for all k, the model reduces to the standard logit model.

Since the public transportation modes, 1 and 2, tend to be correlated, these two choices can be grouped together. The decision tree displayed in Figure 8 is constructed.

Figure 8: Decision Tree for Model Choice

Decision Tree for Model Choice


The two-level decision tree is specified in the NEST statement. The NCHOICE= option is not allowed for nested logit estimation. Instead, the CHOICE= option needs to be specified, as in the following statements:

/*-- nested logit estimation --*/
proc mdc data=newdata;
   model decision = ttime /
            type=nlogit
            choice=(mode 1 2 3)
            covest=hess;
   id pid;
   utility u(1,) = ttime;
   nest level(1) = (1 2 @ 1, 3 @ 2),
        level(2) = (1 2 @ 1);
run;

In Figure 9, estimates of the inclusive value parameters, INC_L2G1C1 and INC_L2G1C2, are indicative of a nested model structure. For more information about inclusive values, see the sections Nested Logit and Decision Tree and Nested Logit.

Figure 9: Two-Level Nested Logit Estimates

The MDC Procedure
 
Nested Logit Estimates

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
ttime_L11-0.40400.1241-3.250.0011
INC_L2G1C110.80160.43521.840.0655
INC_L2G1C210.80870.35912.250.0243


The nested logit model is estimated with the restriction INC_L2G1C1 = INC_L2G1C2 by specifying the SAMESCALE option, as in the following statements:

/*-- nlogit with samescale option --*/
proc mdc data=newdata;
   model decision = ttime /
            type=nlogit
            choice=(mode 1 2 3)
            samescale
            covest=hess;
   id pid;
   utility u(1,) = ttime;
   nest level(1) = (1 2 @ 1, 3 @ 2),
        level(2) = (1 2 @ 1);
run;

The estimation result is displayed in Figure 10.

Figure 10: Nested Logit Estimates with One Dissimilarity Parameter

The MDC Procedure
 
Nested Logit Estimates

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
ttime_L11-0.40250.1217-3.310.0009
INC_L2G110.82090.30192.720.0066


The nested logit model is equivalent to the conditional logit model if INC_L2G1C1 = INC_L2G1C2 = 1. You can verify this relationship by estimating a constrained nested logit model as shown in the following statements. (For more information about imposing linear restrictions on parameter estimates, see the section RESTRICT Statement.)

/*-- constrained nested logit estimation --*/
proc mdc data=newdata;
   model decision = ttime /
            type=nlogit
            choice=(mode 1 2 3)
            covest=hess;
   id pid;
   utility u(1,) = ttime;
   nest level(1) = (1 2 @ 1, 3 @ 2),
        level(2) = (1 2 @ 1);
   restrict INC_L2G1C1 = 1, INC_L2G1C2 =1;
run;

The parameter estimates and the active linear constraints for the constrained nested logit model are displayed in Figure 11.

Figure 11: Constrained Nested Logit Estimates

The MDC Procedure
 
Nested Logit Estimates

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Parameter Label
ttime_L11-0.35720.0776-4.60<.0001 
INC_L2G1C101.00000   
INC_L2G1C201.00000   
Restrict11-2.17068.4098-0.260.7993*Linear EC [ 1 ]
Restrict213.657310.00010.370.7186*Linear EC [ 2 ]

* Probability computed using beta distribution.


Linearly Independent Active Linear Constraints
10=-1.0000+1.0000*INC_L2G1C1
20=-1.0000+1.0000*INC_L2G1C2


Last updated: June 19, 2025