The MDC Procedure |
UTILITY Statement |
The UTILITY statement specifies a utility function that can be used in estimating a nested logit model. The U()= option can have two arguments. The first argument contains level information, and the second argument is related to choice information. The second argument can be omitted for the first level when all the choices at the first level share the same variables and the same parameters. However, for any level above the first, the second argument must be provided. The UTILITY statement specifies a utility function while the NEST statement constructs the decision tree.
Consider a two-level nested logit model that has one explanatory variable at level 1. This model can be specified as follows:
proc mdc data=one type=nlogit; model y = cost / choice=(choice); id pid; utility u(1,2 3 4) = cost; nest level(1) = (1 @ 1, 2 3 4 @ 2), level(2) = (1 2 @ 1); run;
You also can specify the following statement because all the variables at the first level share the same explanatory variable, cost:
utility u(1,) = cost;
The variable, cost, must be listed in the MODEL statement. When the additional explanatory variable, dummy, is included at level 2, another U()= option needs to be specified. Note that the U()= option must specify choices within any level above the first. Thus, it is specified as U(2, 1 2) in the following statements:
proc mdc data=one type=nlogit; model y = cost dummy / choice=(choice); id pid; utility u(1,) = cost, u(2,1 2) = dummy; nest level(1) = (1 @ 1, 2 3 4 @ 2), level(2) = (1 2 @ 1); run;
Copyright © SAS Institute, Inc. All Rights Reserved.