SN-010047 ***Alert Note***
Goodness-of-fit statistics are incorrect for nested logit models
Product: SAS/ETS Component: MDC procedure Priority: ALERT
The goodness-of-fit statistics are incorrect for nested logit models.
Correct values of the goodness-of-fit measures may be computed in a DATA step using the log likelihood value, number of observations, number of regressors in the model, and the null model log likelihood value. In order to compute the null model log likelihood value, use PROC MDC to estimate the null model by restricting the regressor coefficients to 0.0 and the inclusive value parameters to 1.0, as in the following example:
proc mdc data=choicedata; title 'Null Model'; model decision = x1 x2 x3 / type=nlogit choice=(mode); id id; restrict fixedparm=(0.0 0.0 0.0 1.0 1.0); * Release 8.2 syntax *; *restrict x1_L1=0.0, x2_L1=0.0, x3_L2G1=0.0, INC_L2G1C1=1.0, INC_L2G1C2=1; * SAS System 9 syntax *; utility u(1,)=x1-x2, u(2, 1 2 @ 1)=x3; nest level(1) = (1 2 3 @ 1, 4 5 @ 2), level(2) = (1 2 @ 1); run;
data GoodnessOfFit; LogLo=-611.58641; * null model log likelihood *; LogL =-610.23835; * log likelihood *; N=380; * number of observations *; K=3; * number of regressors *; length measure $ 20; keep measure Value; R=2*(LogL-LogLo); U=-2*LogLo; measure='LikelihoodRatio'; value=R; output; measure='UpperBoundOfR'; value=U; output; measure='AldrichNelson'; value=R/(R+N); output; measure='CraggUhler1'; value=1-exp(-R/N); output; measure='CraggUhler2'; value=(1-exp(-R/N))/(1-exp(-U/N)); output; measure='Estrella'; value=1-(1-R/U)**(U/N); output; measure='AdjustedEstrella'; value=1-((LogL-K)/LogLo)**(-2/N*LogLo); output; measure='McFaddenLRI'; value=R/U; output; measure='VeallZimmermann'; value=(R*(U+N))/(U*(R+N)); output; run;