[Limdep Nlogit List] Simulation using estimates from SP data and ASCs from RP data
Thao Thai
Thao.T.Thai at monash.edu
Sat Jul 4 12:29:42 AEST 2020
Hi Nlogit users,
I am simulating some scenarios using the coefficient estimates from a CL
model on SP data and alternative specific constants (ASCs) calibrated to
reflect the RP data.
However, the reported market shares in the base case shows the market
shares observed in SP data. The reported market shares of the simulated
scenarios are also compared to these SP data market shares, which I think
is not correct (It should be compared to the market shares from RP data)?
Could you please kindly let me know if my syntax below is correct?
Thank you so much for your help!
Thao
|-> sample;all$
|-> reject;sprp=1$
|-> Nlogit
;lhs = cho, cset, alti
;choices = H, C, P, I, G, N
;crosstabs
;checkdata
;model:
U(H) = rl_h1 * RL_H1 + rl_h2 * RL_H2
+ fl_ * FL_H
+ cr_h1 * CR_H1 + cr_2 * CR_H2
+ lo_h1 * LO_H1
+ sa_ * SA_H
/
U(C) = com
+ rl_c1 * RL_C1 + rl_c2 * RL_C2
+ fl_ * FL_C
+ cr_c1 * CR_C1 + cr_2 * CR_C2
+ lo_c1 * LO_C1 + lo_c2 * LO_C2
+ sa_ * SA_C/
U(P) = pri
+ rl_p1 * RL_P1
+ fl_ * FL_P
+ cr_p1 * CR_P1 + cr_2 * CR_P2
+ lo_p1 * LO_P1 + lo_p2 * LO_P2
+ sa_ * SA_P/
U(I) = ind
+ rl_i1 * RL_I1 + rl_i2 * RL_I2
+ fl_ * FL_I
+ cr_i1 * CR_I1
+ lo_i1 * LO_I1
+ sa_ * SA_I/
U(G) = gov
+ rl_g1 * RL_G1
+ fl_ * FL_G
+ cr_g1 * CR_G1
+ lo_g1 * LO_G1
+ sa_ * SA_G/
U(N) = non
+ rl_n1 * RL_N1
+ fl_ * FL_N
+ cr_n1 * CR_N1
+ lo_n1 * LO_N1 + lo_n2 * LO_N2
+ sa_ * SA_N
$
+----------------------------------------------------------+
| Inspecting the data set before estimation. |
| These errors mark observations which will be skipped. |
| Row Individual = 1st row then group number of data block |
+----------------------------------------------------------+
No bad observations were found in the sample
Iterative procedure has converged
Normal exit: 5 iterations. Status=0, F= .4001834D+04
-----------------------------------------------------------------------------
Discrete choice (multinomial logit) model
Dependent variable Choice
Log likelihood function -4001.83388
Estimation based on N = 2434, K = 32
Inf.Cr.AIC = 8067.7 AIC/N = 3.315
---------------------------------------
Log likelihood R-sqrd R2Adj
ASCs only model must be fit separately
Use NLOGIT ;...;RHS=ONE$
Note: R-sqrd = 1 - logL/Logl(constants)
---------------------------------------
Chi-squared[27] = 655.81735
Prob [ chi squared > value ] = .00000
Response data are given as ind. choices
Number of obs.= 2434, skipped 0 obs
--------+--------------------------------------------------------------------
| Standard Prob. 95% Confidence
CHO| Coefficient Error z |z|>Z* Interval
--------+--------------------------------------------------------------------
RL_H1| .07005 .16175 .43 .6650 -.24697 .38707
RL_H2| .23104* .13433 1.72 .0855 -.03225 .49433
FL_| .17867*** .05585 3.20 .0014 .06920 .28813
CR_H1| .27104** .13131 2.06 .0390 .01368 .52840
CR_2| .05296 .09477 .56 .5763 -.13279 .23871
LO_H1| -.41466*** .12119 -3.42 .0006 -.65219 -.17713
SA_| .01231*** .00086 14.30 .0000 .01062 .01399
COM| -.10806 .15871 -.68 .4959 -.41913 .20300
RL_C1| .38787** .16751 2.32 .0206 .05956 .71618
RL_C2| .26364* .15216 1.73 .0832 -.03459 .56187
CR_C1| .19661 .13691 1.44 .1510 -.07174 .46496
LO_C1| -.22246* .12854 -1.73 .0835 -.47440 .02949
LO_C2| -.82061*** .15800 -5.19 .0000 -1.13027 -.51094
PRI| .40590*** .14002 2.90 .0037 .13146 .68034
RL_P1| .01672 .12447 .13 .8932 -.22725 .26068
CR_P1| .33357** .13132 2.54 .0111 .07619 .59095
LO_P1| -.95156*** .14221 -6.69 .0000 -1.23029 -.67282
LO_P2| -1.03276*** .14087 -7.33 .0000 -1.30885 -.75667
IND| -1.11685*** .15286 -7.31 .0000 -1.41645 -.81725
RL_I1| .64312*** .14665 4.39 .0000 .35570 .93054
RL_I2| .79032*** .15550 5.08 .0000 .48555 1.09508
CR_I1| .61024*** .12199 5.00 .0000 .37115 .84933
LO_I1| -.64615*** .12354 -5.23 .0000 -.88828 -.40402
GOV| -.07470 .14043 -.53 .5948 -.34993 .20053
RL_G1| -.33174** .12927 -2.57 .0103 -.58510 -.07838
CR_G1| .51684*** .12294 4.20 .0000 .27588 .75781
LO_G1| -.57783*** .12464 -4.64 .0000 -.82212 -.33354
NON| -.26651* .14521 -1.84 .0665 -.55112 .01810
RL_N1| -.08143 .13884 -.59 .5576 -.35355 .19070
CR_N1| .36292*** .13942 2.60 .0092 .08965 .63618
LO_N1| -.58506*** .15904 -3.68 .0002 -.89677 -.27336
LO_N2| -.46639*** .16171 -2.88 .0039 -.78333 -.14945
--------+--------------------------------------------------------------------
***, **, * ==> Significance at 1%, 5%, 10% level.
Model was estimated on Jul 04, 2020 at 00:17:29 PM
-----------------------------------------------------------------------------
|-> sample;all$
|-> reject;sprp=1$
|-> Nlogit
;lhs = cho, cset, alti
;choices = H, C, P, I, G, N/0.23,0.53,0.04,0.04,0.09,0.07
;checkdata
;show
'Alg=BFGS
;calibrate
; simulation
; scenario: RL_C1(c)=1/RL_C2(c)=0
;model:
U(H) = rl_h1[0.0700481] * RL_H1 + rl_h2[0.231038] * RL_H2
+ fl_[0.178665] * FL_H
+ cr_h1[0.271042] * CR_H1 + cr_2[0.0529584] * CR_H2
+ lo_h1[-0.414659] * LO_H1
+ sa_[0.0123069] * SA_H
/
U(C) = com
+ rl_c1[0.387869] * RL_C1 + rl_c2[0.263637] * RL_C2
+ fl_[0.178665] * FL_C
+ cr_c1[0.19661] * CR_C1 + cr_2[0.0529584] * CR_C2
+ lo_c1[-0.222456] * LO_C1 + lo_c2[-0.820609] * LO_C2
+ sa_[0.0123069] * SA_C
/
U(P) = pri
+ rl_p1[0.0167174] * RL_P1
+ fl_[0.178665] * FL_P
+ cr_p1[0.333571] * CR_P1 + cr_2[0.0529584] * CR_P2
+ lo_p1[-0.951557] * LO_P1 + lo_p2[-1.03276] * LO_P2
+ sa_[0.0123069] * SA_P
/
U(I) = ind
+ rl_i1[0.643119] * RL_I1 + rl_i2[0.790318] * RL_I2
+ fl_[0.178665] * FL_I
+ cr_i1[0.610239] * CR_I1
+ lo_i1[-0.64615] * LO_I1
+ sa_[0.0123069] * SA_I
/
U(G) = gov
+ rl_g1[-0.331743] * RL_G1
+ fl_[0.178665] * FL_G
+ cr_g1[0.516844] * CR_G1
+ lo_g1[-0.57783] * LO_G1
+ sa_[0.0123069] * SA_G
/
U(N) = non
+ rl_n1[-0.0814267] * RL_N1
+ fl_[0.178665] * FL_N
+ cr_n1[0.36292] * CR_N1
+ lo_n1[-0.585064] * LO_N1 + lo_n2[-0.466387] * LO_N2
+ sa_[0.0123069] * SA_N$
+----------------------------------------------------------+
| Inspecting the data set before estimation. |
| These errors mark observations which will be skipped. |
| Row Individual = 1st row then group number of data block |
+----------------------------------------------------------+
No bad observations were found in the sample
Sample proportions are marginal, not conditional.
Choices marked with * are excluded for the IIA test.
+----------------+------+
|Choice (prop.)| Count|
+----------------+------+
|H .18447| 449|
|C .17707| 431|
|P .19721| 480|
|I .17502| 426|
|G .14749| 359|
|N .11873| 289|
+----------------+------+
+---------------------------------------------+
| Discrete Choice (One Level) Model |
| Model Simulation Using Previous Estimates |
| Number of observations 2434 |
+---------------------------------------------+
+------------------------------------------------------+
|Simulations of Probability Model |
|Model: Discrete Choice (One Level) Model |
|Simulated choice set may be a subset of the choices. |
|Number of individuals is the probability times the |
|number of observations in the simulated sample. |
|Column totals may be affected by rounding error. |
|The model used was simulated with 2434 observations.|
+------------------------------------------------------+
-------------------------------------------------------------------------
Specification of scenario 1 is:
Attribute Alternatives affected Change type Value
--------- ------------------------------- ------------------- ---------
RL_C1 C Fix base at new vlu 1.000
RL_C2 C Fix base at new vlu .000
-------------------------------------------------------------------------
The simulator located 2434 observations for this scenario.
Simulated Probabilities (shares) for this scenario:
+----------+--------------+--------------+------------------+
|Choice | Base | Scenario | Scenario - Base |
| |%Share Number |%Share Number |ChgShare ChgNumber|
+----------+--------------+--------------+------------------+
|H | 18.447 449 | 17.950 437 | -.497% -12 |
|C | 17.707 431 | 19.889 484 | 2.182% 53 |
|P | 19.721 480 | 19.142 466 | -.579% -14 |
|I | 17.502 426 | 17.095 416 | -.407% -10 |
|G | 14.749 359 | 14.335 349 | -.415% -10 |
|N | 11.873 289 | 11.589 282 | -.284% -7 |
|Total |100.000 2434 |100.000 2434 | .000% 0 |
+----------+--------------+--------------+------------------+
More information about the Limdep
mailing list