Hi everyone,
I’m trying to solve a nested logit model (nlogit) in Stata and trying to get the marginal effects of the covariates for each level (first level being no internet (a binary variable) and the second level being INTERSTATUS (a categorical variable with 3 outcomes))
Here I can’t find the command to get the marginal effect that we would get from « margins dydx(*) » for a simple logit.
I've attached my code and my results.
Would appreciate any tips on how to resolve this.
Thanks,
nlogitgen type = _j(nointernet: 1 , internet: 2 | 3 | 4)
nlogit INTERSTATUS || type : nbpers5 age6fuz sexe || _j: ZPD RESEAU4G , noconstant case(id)
tree structure specified for the nested logit model
type N _j N k
----------------------------------
nointernet 1907 --- 1 1907 193
internet 5721 --- 2 1907 71
|- 3 1907 887
+- 4 1907 756
----------------------------------
total 7628 1907
k = number of times alternative is chosen
N = number of observations at each level
Iteration 0: log likelihood = -2195.573
Iteration 1: log likelihood = -2104.7732 (backed up)
Iteration 2: log likelihood = -2103.0417 (backed up)
Iteration 3: log likelihood = -2100.9125 (backed up)
Iteration 4: log likelihood = -2097.506
Iteration 5: log likelihood = -2092.982
Iteration 6: log likelihood = -2089.0997
Iteration 7: log likelihood = -2083.7384
Iteration 8: log likelihood = -2078.6778
Iteration 9: log likelihood = -2074.6366
Iteration 10: log likelihood = -2065.0918
Iteration 11: log likelihood = -2062.6762
Iteration 12: log likelihood = -2062.5108
Iteration 13: log likelihood = -2062.2563
Iteration 14: log likelihood = -2062.0861
Iteration 15: log likelihood = -2062.0235
Iteration 16: log likelihood = -2062.0195
Iteration 17: log likelihood = -2062.0192
Iteration 18: log likelihood = -2062.0191
Iteration 19: log likelihood = -2062.0191
Iteration 20: log likelihood = -2062.0191
Iteration 21: log likelihood = -2062.0191
Iteration 22: log likelihood = -2062.0191
Iteration 23: log likelihood = -2062.0191
RUM-consistent nested logit regression Number of obs = 7628
Case variable: id Number of cases = 1907
Alternative variable: _j Alts per case: min = 4
avg = 4.0
max = 4
Wald chi2(9) = 244.68
Log likelihood = -2062.0191 Prob > chi2 = 0.0000
--------------------------------------------------------------------------------
INTERSTATUS | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------------------------------------------------------------------
type equations
--------------------------------------------------------------------------------
nointernet |
nbpers5 | -1.020204 .1261803 -8.09 0.000 -1.267513 -.7728954
age6fuz | .7132882 .1317238 5.42 0.000 .4551142 .9714622
sexe | -.2013856 .1725092 -1.17 0.243 -.5394975 .1367263
---------------+----------------------------------------------------------------
internet |
nbpers5 | 0 (base)
age6fuz | 0 (base)
sexe | 0 (base)
--------------------------------------------------------------------------------
_j equations
--------------------------------------------------------------------------------
_j1 |
ZPD | 0 (base)
RESEAU4G | 0 (base)
---------------+----------------------------------------------------------------
_j2 |
ZPD | -3.228152 .9203545 -3.51 0.000 -5.032014 -1.42429
RESEAU4G | -.2820256 1.015416 -0.28 0.781 -2.272205 1.708154
---------------+----------------------------------------------------------------
_j3 |
ZPD | .7029937 .3598078 1.95 0.051 -.0022167 1.408204
RESEAU4G | 2.436545 .5026996 4.85 0.000 1.451272 3.421818
---------------+----------------------------------------------------------------
_j4 |
ZPD | -.3895115 .2778148 -1.40 0.161 -.9340186 .1549956
RESEAU4G | 4.130902 .5305189 7.79 0.000 3.091104 5.1707
--------------------------------------------------------------------------------
dissimilarity parameters
--------------------------------------------------------------------------------
type |
/nointernet_~u | 1 651295.6 -1276515 1276517
/internet_tau | 1.939263 .4939697 .9711001 2.907426
--------------------------------------------------------------------------------
LR test for IIA (tau = 1): chi2(2) = 3.81 Prob > chi2 = 0.1485
------------------------------------------------------------------------------
I’m trying to solve a nested logit model (nlogit) in Stata and trying to get the marginal effects of the covariates for each level (first level being no internet (a binary variable) and the second level being INTERSTATUS (a categorical variable with 3 outcomes))
Here I can’t find the command to get the marginal effect that we would get from « margins dydx(*) » for a simple logit.
I've attached my code and my results.
Would appreciate any tips on how to resolve this.
Thanks,
nlogitgen type = _j(nointernet: 1 , internet: 2 | 3 | 4)
nlogit INTERSTATUS || type : nbpers5 age6fuz sexe || _j: ZPD RESEAU4G , noconstant case(id)
tree structure specified for the nested logit model
type N _j N k
----------------------------------
nointernet 1907 --- 1 1907 193
internet 5721 --- 2 1907 71
|- 3 1907 887
+- 4 1907 756
----------------------------------
total 7628 1907
k = number of times alternative is chosen
N = number of observations at each level
Iteration 0: log likelihood = -2195.573
Iteration 1: log likelihood = -2104.7732 (backed up)
Iteration 2: log likelihood = -2103.0417 (backed up)
Iteration 3: log likelihood = -2100.9125 (backed up)
Iteration 4: log likelihood = -2097.506
Iteration 5: log likelihood = -2092.982
Iteration 6: log likelihood = -2089.0997
Iteration 7: log likelihood = -2083.7384
Iteration 8: log likelihood = -2078.6778
Iteration 9: log likelihood = -2074.6366
Iteration 10: log likelihood = -2065.0918
Iteration 11: log likelihood = -2062.6762
Iteration 12: log likelihood = -2062.5108
Iteration 13: log likelihood = -2062.2563
Iteration 14: log likelihood = -2062.0861
Iteration 15: log likelihood = -2062.0235
Iteration 16: log likelihood = -2062.0195
Iteration 17: log likelihood = -2062.0192
Iteration 18: log likelihood = -2062.0191
Iteration 19: log likelihood = -2062.0191
Iteration 20: log likelihood = -2062.0191
Iteration 21: log likelihood = -2062.0191
Iteration 22: log likelihood = -2062.0191
Iteration 23: log likelihood = -2062.0191
RUM-consistent nested logit regression Number of obs = 7628
Case variable: id Number of cases = 1907
Alternative variable: _j Alts per case: min = 4
avg = 4.0
max = 4
Wald chi2(9) = 244.68
Log likelihood = -2062.0191 Prob > chi2 = 0.0000
--------------------------------------------------------------------------------
INTERSTATUS | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------------------------------------------------------------------
type equations
--------------------------------------------------------------------------------
nointernet |
nbpers5 | -1.020204 .1261803 -8.09 0.000 -1.267513 -.7728954
age6fuz | .7132882 .1317238 5.42 0.000 .4551142 .9714622
sexe | -.2013856 .1725092 -1.17 0.243 -.5394975 .1367263
---------------+----------------------------------------------------------------
internet |
nbpers5 | 0 (base)
age6fuz | 0 (base)
sexe | 0 (base)
--------------------------------------------------------------------------------
_j equations
--------------------------------------------------------------------------------
_j1 |
ZPD | 0 (base)
RESEAU4G | 0 (base)
---------------+----------------------------------------------------------------
_j2 |
ZPD | -3.228152 .9203545 -3.51 0.000 -5.032014 -1.42429
RESEAU4G | -.2820256 1.015416 -0.28 0.781 -2.272205 1.708154
---------------+----------------------------------------------------------------
_j3 |
ZPD | .7029937 .3598078 1.95 0.051 -.0022167 1.408204
RESEAU4G | 2.436545 .5026996 4.85 0.000 1.451272 3.421818
---------------+----------------------------------------------------------------
_j4 |
ZPD | -.3895115 .2778148 -1.40 0.161 -.9340186 .1549956
RESEAU4G | 4.130902 .5305189 7.79 0.000 3.091104 5.1707
--------------------------------------------------------------------------------
dissimilarity parameters
--------------------------------------------------------------------------------
type |
/nointernet_~u | 1 651295.6 -1276515 1276517
/internet_tau | 1.939263 .4939697 .9711001 2.907426
--------------------------------------------------------------------------------
LR test for IIA (tau = 1): chi2(2) = 3.81 Prob > chi2 = 0.1485
------------------------------------------------------------------------------
Comment