[Limdep Nlogit List] MNL model with binary choices
Mat English
matenglish123 at gmail.com
Fri Oct 29 02:25:20 AEDT 2021
Hello,
I'm a novice user of NLOGIT, but have used it successfully in the past.
However, this time I'm having troubles modeling with it. I'm working on a
traffic data. Most variables are coded as binary 0,1 (PT in the following
example), while some other are continuous integer such as AGE. Following is
a sample data shown for reference. D1 is there was a delay, D2 means no
delay.
CASEID D1 D2 DELAY WT1 WT2 PT AGE
1 0 1 1 500 0.0862 0 72
1 1 0 0 500 0.0862 0 72
2 0 1 1 250 0.0431 1 72
2 1 0 0 250 0.0431 1 72
3 0 1 1 700 0.1207 0 46
3 1 0 0 700 0.1207 0 46
4 0 1 0 350 0.0603 1 62
4 1 0 1 350 0.0603 1 62
5 0 1 1 1100 0.1897 0 61
5 1 0 0 1100 0.1897 0 61
sum =1
The model code with weight WT1 and output is as follows
RESET;
TIMER;
READ;
NVAR=51;
NOBS=25000;
FILE="C:\...\FILENAME.csv";
NAMES=1$
Last observation read from data file was 1850
|-> NLOGIT;
LHS=DELAY;
CHOICES = D1, D2;
MODEL:
U(TB)= CONST1 + B1*PT + B2*WALK/
U(NTB) = N1*AGE + N2*AUTO ;
WTS=WT1$
-----------------------------------------------------------------------------
Discrete choice (multinomial logit) model
Dependent variable Choice
Weighting variable WT1
Log likelihood function **************
Estimation based on N = 903, K = 5
Inf.Cr.AIC =********* AIC/N = ********
Model estimated: Oct 28, 2021, 09:27:55
R2=1-LogL/LogL* Log-L fncn R-sqrd R2Adj
Constants only must be computed directly
Use NLOGIT ;...;RHS=ONE$
Response data are given as ind. choices
Number of obs.= 925, skipped 22 obs
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
BURDEN| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
CONST1| -.05596*** .00071 -78.89 .0000 -.05735 -.05457
B1| .36310*** .00072 507.59 .0000 .36170 .36450
B2| 2.51819*** .00099 2534.02 .0000 2.51624 2.52014
N1| .12821*** .00013 991.21 .0000 .12796 .12846
N2| -1.32626*** .00063 -2110.81 .0000 -1.32749 -1.32503
--------+--------------------------------------------------------------------
Note: ***, **, * ==> Significance at 1%, 5%, 10% level.
-----------------------------------------------------------------------------
Note that, the LL, R-sqrd and R2Adj are missing in this output but all the
independent variables are significant. With the normalized weight i.e. WT2
the output gets the LL but doesn't show R-sqrd and R2Adj and turns the
variables to non-significant.
-----------------------------------------------------------------------------
Discrete choice (multinomial logit) model
Dependent variable Choice
Weighting variable WT2
Log likelihood function -.28858
Estimation based on N = 903, K = 5
Inf.Cr.AIC = 10.6 AIC/N = .012
Model estimated: Oct 28, 2021, 09:28:09
R2=1-LogL/LogL* Log-L fncn R-sqrd R2Adj
Constants only must be computed directly
Use NLOGIT ;...;RHS=ONE$
Chi-squared[ 4] = .02277
Prob [ chi squared > value ] = .99994
Response data are given as ind. choices
Number of obs.= 925, skipped 22 obs
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
BURDEN| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
CONST1| -.05596 16.88721 .00 .9974 -33.15427 33.04236
B1| .36309 17.02909 .02 .9830 -33.01330 33.73948
B2| 2.51819 23.65697 .11 .9152 -43.84862 48.88499
N1| .12821 3.07921 .04 .9668 -5.90693 6.16336
N2| -1.32626 14.95749 -.09 .9293 -30.64241 27.98989
--------+--------------------------------------------------------------------
Note: ***, **, * ==> Significance at 1%, 5%, 10% level.
-----------------------------------------------------------------------------
I don't understand what's causing this and which is the correct approach.
Since, there are only two outcomes that are exhaustive and mutually
exclusive, I also tried a binary logit model which gives me a weird output.
LOGIT;
LHS=DELAY;
CHOICES = D1, D2;
RHS = ONE,PT,WALK,AGE,AUTO ; WTS=WT1$
-----------------------------------------------------------------------------
Binary Logit Model for Binary Choice
Dependent variable BURDEN
Weighting variable WT1
Log likelihood function **************
Restricted log likelihood**************
Chi squared [ 4 d.f.] .00000
Significance level 1.00000
McFadden Pseudo R-squared .0000000
Estimation based on N = 1850, K = 5
Inf.Cr.AIC =********* AIC/N = ********
Model estimated: Oct 28, 2021, 09:33:51
Corrected for Choice Based Sampling
Hosmer-Lemeshow chi-squared = .05435
P-value= 1.00000 with deg.fr. = 8
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
BURDEN| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
Constant| 0.0 .00042 .00 1.0000 -.82486D-03 .82486D-03
PT| 0.0 .00049 .00 1.0000 -.97015D-03 .97015D-03
WALK| 0.0 .00055 .00 1.0000 -.10809D-02 .10809D-02
EDUC| 0.0 .4255D-06 .00 1.0000 -.83401D-06 .83401D-06
AUTO| 0.0 .00043 .00 1.0000 -.84621D-03 .84621D-03
--------+--------------------------------------------------------------------
Note: nnnnn.D-xx or D+xx => multiply by 10 to -xx or +xx.
Note: ***, **, * ==> Significance at 1%, 5%, 10% level.
-----------------------------------------------------------------------------
Can you kindly explain which one is the correct modeling approach and which
weight should be used.
Regards,
Matt
ReplyForward
<https://protect-au.mimecast.com/s/QONUCMwGxOtqMXQlnUwfptc?domain=drive.google.com>
<https://protect-au.mimecast.com/s/zAnwCNLJyQU0D72Rgh4no7g?domain=google.com>
<https://protect-au.mimecast.com/s/jjlQCOMKzVTpzn6GBCkDQQ7?domain=google.com>
<https://protect-au.mimecast.com/s/N0C3CP7LAXfK8W7lLUjBdh1?domain=google.com>
More information about the Limdep
mailing list