Model run by stephane.hess using Apollo 0.2.9 on R 4.0.5 for Darwin. www.ApolloChoiceModelling.com Model name : EL Model description : Exploded logit model on drug choice data Model run at : 2023-05-10 22:03:59 Estimation method : bfgs Model diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definitive maximum eigenvalue : -141.221713 Number of individuals : 1000 Number of rows in database : 10000 Number of modelled outcomes : 10000 Number of cores used : 1 Model without mixing LL(start) : -31780.54 LL at equal shares, LL(0) : -31780.54 LL at observed shares, LL(C) : NA LL(final) : -27152.53 Rho-squared vs equal shares : 0.1456 Adj.Rho-squared vs equal shares : 0.1452 Rho-squared vs observed shares : Not applicable Adj.Rho-squared vs observed shares : Not applicable AIC : 54335.06 BIC : 54443.21 Estimated parameters : 15 Time taken (hh:mm:ss) : 00:00:35.25 pre-estimation : 00:00:1.42 estimation : 00:00:19.28 initial estimation : 00:00:17.71 estimation after rescaling : 00:00:1.57 post-estimation : 00:00:14.55 Iterations : 32 initial estimation : 29 estimation after rescaling : 3 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) b_brand_Artemis 0.000000 NA NA NA NA b_brand_Novum -0.285093 0.02477 -11.512 0.02468 -11.551 b_brand_BestValue -0.562423 0.04616 -12.185 0.04792 -11.737 b_brand_Supermarket -0.285281 0.04754 -6.001 0.05232 -5.452 b_brand_PainAway -1.158687 0.04810 -24.091 0.05077 -22.823 b_country_CH 0.585662 0.03206 18.267 0.03154 18.569 b_country_DK 0.283654 0.03045 9.315 0.03043 9.321 b_country_USA 0.000000 NA NA NA NA b_country_IND -0.279773 0.04067 -6.878 0.04195 -6.670 b_country_RUS -0.852014 0.04323 -19.710 0.04277 -19.919 b_country_BRA -0.612893 0.04213 -14.546 0.04312 -14.212 b_char_standard 0.000000 NA NA NA NA b_char_fast 0.708303 0.02285 30.997 0.02259 31.360 b_char_double 1.120392 0.03127 35.830 0.03013 37.182 b_risk -0.001533 4.323e-05 -35.464 4.264e-05 -35.954 b_price -0.703407 0.01504 -46.768 0.01437 -48.944 scale_1 1.000000 NA NA NA NA scale_2 0.760852 0.02051 37.100 0.01991 38.222 scale_3 0.455253 0.01844 24.687 0.01832 24.846 Overview of choices for model component, stage 1: alt1 alt2 alt3 alt4 Times available 10000.00 10000.00 10000.00 10000.00 Times chosen 3403.00 3546.00 1517.00 1534.00 Percentage chosen overall 34.03 35.46 15.17 15.34 Percentage chosen when available 34.03 35.46 15.17 15.34 Overview of choices for model component, stage 2: alt1 alt2 alt3 alt4 Times available 6597.00 6454.00 8483.00 8466.00 Times chosen 2983.00 2855.00 2106.00 2056.00 Percentage chosen overall 29.83 28.55 21.06 20.56 Percentage chosen when available 45.22 44.24 24.83 24.29 Overview of choices for model component, stage 3: alt1 alt2 alt3 alt4 Times available 3614.00 3599.00 6377.00 6410.00 Times chosen 2083.00 2054.00 2895.00 2968.00 Percentage chosen overall 20.83 20.54 28.95 29.68 Percentage chosen when available 57.64 57.07 45.40 46.30 Classical covariance matrix: b_brand_Novum b_brand_BestValue b_brand_Supermarket b_brand_PainAway b_brand_Novum 6.1331e-04 3.2145e-04 3.6403e-04 3.4617e-04 b_brand_BestValue 3.2145e-04 0.002130 0.001581 0.001502 b_brand_Supermarket 3.6403e-04 0.001581 0.002260 0.001507 b_brand_PainAway 3.4617e-04 0.001502 0.001507 0.002313 b_country_CH -5.288e-05 4.3466e-04 4.7112e-04 3.3832e-04 b_country_DK -4.197e-05 4.1266e-04 4.5278e-04 3.7164e-04 b_country_IND -2.465e-05 -7.9547e-04 -8.3114e-04 -7.1203e-04 b_country_RUS -9.125e-06 -7.6581e-04 -8.3744e-04 -6.0247e-04 b_country_BRA 3.071e-06 -7.2622e-04 -8.7454e-04 -6.6705e-04 b_char_fast -9.076e-06 -7.648e-06 6.078e-05 -1.2454e-04 b_char_double 3.313e-05 2.3849e-04 3.1965e-04 9.899e-05 b_risk 3.806e-08 -2.729e-07 -4.007e-07 1.125e-07 b_price 3.254e-05 2.1139e-04 1.7384e-04 2.9726e-04 scale_2 2.768e-05 4.527e-05 -3.289e-05 2.2528e-04 scale_3 1.979e-06 -2.280e-05 -6.808e-05 1.0221e-04 b_country_CH b_country_DK b_country_IND b_country_RUS b_brand_Novum -5.288e-05 -4.197e-05 -2.465e-05 -9.125e-06 b_brand_BestValue 4.3466e-04 4.1266e-04 -7.9547e-04 -7.6581e-04 b_brand_Supermarket 4.7112e-04 4.5278e-04 -8.3114e-04 -8.3744e-04 b_brand_PainAway 3.3832e-04 3.7164e-04 -7.1203e-04 -6.0247e-04 b_country_CH 0.001028 4.7689e-04 -5.259e-05 -9.656e-05 b_country_DK 4.7689e-04 9.2728e-04 1.771e-05 -3.265e-05 b_country_IND -5.259e-05 1.771e-05 0.001654 8.5263e-04 b_country_RUS -9.656e-05 -3.265e-05 8.5263e-04 0.001869 b_country_BRA -1.1943e-04 -5.662e-05 8.6249e-04 8.9463e-04 b_char_fast 1.0082e-04 5.980e-05 -8.537e-05 -1.5092e-04 b_char_double 1.2546e-04 4.637e-05 -8.211e-05 -1.6339e-04 b_risk -1.906e-07 -9.639e-08 1.329e-07 3.557e-07 b_price -9.112e-05 -3.467e-05 4.684e-05 1.0958e-04 scale_2 -1.0045e-04 -5.210e-05 5.977e-05 2.0245e-04 scale_3 -5.989e-05 -3.247e-05 7.033e-05 1.5082e-04 b_country_BRA b_char_fast b_char_double b_risk b_brand_Novum 3.071e-06 -9.076e-06 3.313e-05 3.806e-08 b_brand_BestValue -7.2622e-04 -7.648e-06 2.3849e-04 -2.729e-07 b_brand_Supermarket -8.7454e-04 6.078e-05 3.1965e-04 -4.007e-07 b_brand_PainAway -6.6705e-04 -1.2454e-04 9.899e-05 1.125e-07 b_country_CH -1.1943e-04 1.0082e-04 1.2546e-04 -1.906e-07 b_country_DK -5.662e-05 5.980e-05 4.637e-05 -9.639e-08 b_country_IND 8.6249e-04 -8.537e-05 -8.211e-05 1.329e-07 b_country_RUS 8.9463e-04 -1.5092e-04 -1.6339e-04 3.557e-07 b_country_BRA 0.001775 -1.1460e-04 -1.4100e-04 1.949e-07 b_char_fast -1.1460e-04 5.2216e-04 3.3297e-04 -2.356e-07 b_char_double -1.4100e-04 3.3297e-04 9.7777e-04 -2.820e-07 b_risk 1.949e-07 -2.356e-07 -2.820e-07 1.869e-09 b_price 1.0069e-04 -9.632e-05 -1.2400e-04 2.204e-07 scale_2 1.3022e-04 -1.4320e-04 -1.8360e-04 4.103e-07 scale_3 1.0091e-04 -8.418e-05 -9.482e-05 3.078e-07 b_price scale_2 scale_3 b_brand_Novum 3.254e-05 2.768e-05 1.979e-06 b_brand_BestValue 2.1139e-04 4.527e-05 -2.280e-05 b_brand_Supermarket 1.7384e-04 -3.289e-05 -6.808e-05 b_brand_PainAway 2.9726e-04 2.2528e-04 1.0221e-04 b_country_CH -9.112e-05 -1.0045e-04 -5.989e-05 b_country_DK -3.467e-05 -5.210e-05 -3.247e-05 b_country_IND 4.684e-05 5.977e-05 7.033e-05 b_country_RUS 1.0958e-04 2.0245e-04 1.5082e-04 b_country_BRA 1.0069e-04 1.3022e-04 1.0091e-04 b_char_fast -9.632e-05 -1.4320e-04 -8.418e-05 b_char_double -1.2400e-04 -1.8360e-04 -9.482e-05 b_risk 2.204e-07 4.103e-07 3.078e-07 b_price 2.2621e-04 1.2664e-04 6.475e-05 scale_2 1.2664e-04 4.2059e-04 1.0489e-04 scale_3 6.475e-05 1.0489e-04 3.4007e-04 Robust covariance matrix: b_brand_Novum b_brand_BestValue b_brand_Supermarket b_brand_PainAway b_brand_Novum 6.0911e-04 2.4061e-04 3.0282e-04 2.9481e-04 b_brand_BestValue 2.4061e-04 0.002296 0.001846 0.001728 b_brand_Supermarket 3.0282e-04 0.001846 0.002738 0.001833 b_brand_PainAway 2.9481e-04 0.001728 0.001833 0.002577 b_country_CH -1.0776e-04 3.4240e-04 3.8838e-04 2.8229e-04 b_country_DK -4.996e-05 2.9719e-04 3.7602e-04 3.1968e-04 b_country_IND 3.093e-05 -7.7592e-04 -8.5060e-04 -6.5319e-04 b_country_RUS 4.258e-05 -7.3425e-04 -8.5629e-04 -5.9939e-04 b_country_BRA 7.289e-05 -7.3531e-04 -9.1811e-04 -6.2956e-04 b_char_fast -5.565e-05 -2.408e-05 6.459e-05 -1.0372e-04 b_char_double -2.981e-05 1.8279e-04 2.9728e-04 4.277e-05 b_risk 5.119e-08 -2.730e-07 -4.404e-07 3.461e-08 b_price 4.014e-05 1.6914e-04 1.2864e-04 2.5634e-04 scale_2 5.026e-05 -1.756e-05 -1.3614e-04 1.4783e-04 scale_3 3.782e-05 -1.618e-05 -4.825e-05 9.152e-05 b_country_CH b_country_DK b_country_IND b_country_RUS b_brand_Novum -1.0776e-04 -4.996e-05 3.093e-05 4.258e-05 b_brand_BestValue 3.4240e-04 2.9719e-04 -7.7592e-04 -7.3425e-04 b_brand_Supermarket 3.8838e-04 3.7602e-04 -8.5060e-04 -8.5629e-04 b_brand_PainAway 2.8229e-04 3.1968e-04 -6.5319e-04 -5.9939e-04 b_country_CH 9.9473e-04 4.5409e-04 -4.552e-05 -1.3512e-04 b_country_DK 4.5409e-04 9.2618e-04 2.088e-05 -1.929e-05 b_country_IND -4.552e-05 2.088e-05 0.001759 8.3218e-04 b_country_RUS -1.3512e-04 -1.929e-05 8.3218e-04 0.001830 b_country_BRA -9.891e-05 -5.602e-05 9.4540e-04 9.6164e-04 b_char_fast 1.1822e-04 5.871e-05 -9.462e-05 -1.8640e-04 b_char_double 1.0982e-04 2.142e-05 -1.2921e-04 -2.1149e-04 b_risk -1.619e-07 -6.582e-08 2.012e-07 3.906e-07 b_price -9.148e-05 -3.682e-05 6.889e-05 1.4066e-04 scale_2 -1.2373e-04 -5.683e-05 1.2430e-04 2.2125e-04 scale_3 -6.625e-05 -5.965e-05 5.881e-05 1.4901e-04 b_country_BRA b_char_fast b_char_double b_risk b_brand_Novum 7.289e-05 -5.565e-05 -2.981e-05 5.119e-08 b_brand_BestValue -7.3531e-04 -2.408e-05 1.8279e-04 -2.730e-07 b_brand_Supermarket -9.1811e-04 6.459e-05 2.9728e-04 -4.404e-07 b_brand_PainAway -6.2956e-04 -1.0372e-04 4.277e-05 3.461e-08 b_country_CH -9.891e-05 1.1822e-04 1.0982e-04 -1.619e-07 b_country_DK -5.602e-05 5.871e-05 2.142e-05 -6.582e-08 b_country_IND 9.4540e-04 -9.462e-05 -1.2921e-04 2.012e-07 b_country_RUS 9.6164e-04 -1.8640e-04 -2.1149e-04 3.906e-07 b_country_BRA 0.001860 -1.5099e-04 -2.0058e-04 2.408e-07 b_char_fast -1.5099e-04 5.1015e-04 3.2277e-04 -2.188e-07 b_char_double -2.0058e-04 3.2277e-04 9.0799e-04 -2.110e-07 b_risk 2.408e-07 -2.188e-07 -2.110e-07 1.818e-09 b_price 1.1578e-04 -9.872e-05 -1.1022e-04 1.941e-07 scale_2 1.6622e-04 -1.5111e-04 -1.8667e-04 4.098e-07 scale_3 1.0226e-04 -1.0198e-04 -6.867e-05 3.034e-07 b_price scale_2 scale_3 b_brand_Novum 4.014e-05 5.026e-05 3.782e-05 b_brand_BestValue 1.6914e-04 -1.756e-05 -1.618e-05 b_brand_Supermarket 1.2864e-04 -1.3614e-04 -4.825e-05 b_brand_PainAway 2.5634e-04 1.4783e-04 9.152e-05 b_country_CH -9.148e-05 -1.2373e-04 -6.625e-05 b_country_DK -3.682e-05 -5.683e-05 -5.965e-05 b_country_IND 6.889e-05 1.2430e-04 5.881e-05 b_country_RUS 1.4066e-04 2.2125e-04 1.4901e-04 b_country_BRA 1.1578e-04 1.6622e-04 1.0226e-04 b_char_fast -9.872e-05 -1.5111e-04 -1.0198e-04 b_char_double -1.1022e-04 -1.8667e-04 -6.867e-05 b_risk 1.941e-07 4.098e-07 3.034e-07 b_price 2.0655e-04 1.2118e-04 6.723e-05 scale_2 1.2118e-04 3.9625e-04 1.0723e-04 scale_3 6.723e-05 1.0723e-04 3.3573e-04 Classical correlation matrix: b_brand_Novum b_brand_BestValue b_brand_Supermarket b_brand_PainAway b_brand_Novum 1.000000 0.281222 0.30919 0.29063 b_brand_BestValue 0.281222 1.000000 0.72057 0.67652 b_brand_Supermarket 0.309192 0.720570 1.00000 0.65918 b_brand_PainAway 0.290629 0.676520 0.65918 1.00000 b_country_CH -0.066593 0.293725 0.30909 0.21940 b_country_DK -0.055649 0.293600 0.31277 0.25375 b_country_IND -0.024475 -0.423717 -0.42982 -0.36397 b_country_RUS -0.008524 -0.383823 -0.40750 -0.28978 b_country_BRA 0.002943 -0.373427 -0.43659 -0.32916 b_char_fast -0.016038 -0.007252 0.05595 -0.11332 b_char_double 0.042782 0.165241 0.21502 0.06582 b_risk 0.035556 -0.136784 -0.19500 0.05413 b_price 0.087370 0.304505 0.24312 0.41094 scale_2 0.054501 0.047827 -0.03374 0.22839 scale_3 0.004333 -0.026789 -0.07765 0.11524 b_country_CH b_country_DK b_country_IND b_country_RUS b_brand_Novum -0.06659 -0.05565 -0.02448 -0.008524 b_brand_BestValue 0.29372 0.29360 -0.42372 -0.383823 b_brand_Supermarket 0.30909 0.31277 -0.42982 -0.407500 b_brand_PainAway 0.21940 0.25375 -0.36397 -0.289779 b_country_CH 1.00000 0.48846 -0.04033 -0.069670 b_country_DK 0.48846 1.00000 0.01430 -0.024802 b_country_IND -0.04033 0.01430 1.00000 0.484928 b_country_RUS -0.06967 -0.02480 0.48493 1.000000 b_country_BRA -0.08841 -0.04413 0.50326 0.491181 b_char_fast 0.13762 0.08594 -0.09185 -0.152783 b_char_double 0.12515 0.04870 -0.06456 -0.120877 b_risk -0.13755 -0.07322 0.07558 0.190380 b_price -0.18897 -0.07569 0.07657 0.168538 scale_2 -0.15277 -0.08343 0.07165 0.228369 scale_3 -0.10129 -0.05781 0.09377 0.189193 b_country_BRA b_char_fast b_char_double b_risk b_brand_Novum 0.002943 -0.016038 0.04278 0.03556 b_brand_BestValue -0.373427 -0.007252 0.16524 -0.13678 b_brand_Supermarket -0.436592 0.055951 0.21502 -0.19500 b_brand_PainAway -0.329162 -0.113318 0.06582 0.05413 b_country_CH -0.088408 0.137618 0.12515 -0.13755 b_country_DK -0.044127 0.085936 0.04870 -0.07322 b_country_IND 0.503262 -0.091846 -0.06456 0.07558 b_country_RUS 0.491181 -0.152783 -0.12088 0.19038 b_country_BRA 1.000000 -0.119031 -0.10702 0.10698 b_char_fast -0.119031 1.000000 0.46600 -0.23848 b_char_double -0.107022 0.466004 1.00000 -0.20860 b_risk 0.106984 -0.238482 -0.20860 1.00000 b_price 0.158887 -0.280255 -0.26367 0.33905 scale_2 0.150704 -0.305564 -0.28630 0.46283 scale_3 0.129866 -0.199768 -0.16444 0.38618 b_price scale_2 scale_3 b_brand_Novum 0.08737 0.05450 0.004333 b_brand_BestValue 0.30450 0.04783 -0.026789 b_brand_Supermarket 0.24312 -0.03374 -0.077651 b_brand_PainAway 0.41094 0.22839 0.115237 b_country_CH -0.18897 -0.15277 -0.101295 b_country_DK -0.07569 -0.08343 -0.057815 b_country_IND 0.07657 0.07165 0.093770 b_country_RUS 0.16854 0.22837 0.189193 b_country_BRA 0.15889 0.15070 0.129866 b_char_fast -0.28025 -0.30556 -0.199768 b_char_double -0.26367 -0.28630 -0.164439 b_risk 0.33905 0.46283 0.386178 b_price 1.00000 0.41057 0.233443 scale_2 0.41057 1.00000 0.277350 scale_3 0.23344 0.27735 1.000000 Robust correlation matrix: b_brand_Novum b_brand_BestValue b_brand_Supermarket b_brand_PainAway b_brand_Novum 1.00000 0.20346 0.23449 0.23529 b_brand_BestValue 0.20346 1.00000 0.73642 0.71021 b_brand_Supermarket 0.23449 0.73642 1.00000 0.69015 b_brand_PainAway 0.23529 0.71021 0.69015 1.00000 b_country_CH -0.13844 0.22656 0.23535 0.17630 b_country_DK -0.06651 0.20379 0.23614 0.20691 b_country_IND 0.02988 -0.38604 -0.38756 -0.30674 b_country_RUS 0.04034 -0.35824 -0.38261 -0.27603 b_country_BRA 0.06849 -0.35584 -0.40690 -0.28756 b_char_fast -0.09984 -0.02225 0.05465 -0.09045 b_char_double -0.04008 0.12659 0.18855 0.02796 b_risk 0.04865 -0.13364 -0.19738 0.01599 b_price 0.11316 0.24560 0.17107 0.35133 scale_2 0.10230 -0.01841 -0.13071 0.14628 scale_3 0.08362 -0.01843 -0.05032 0.09838 b_country_CH b_country_DK b_country_IND b_country_RUS b_brand_Novum -0.13844 -0.06651 0.02988 0.04034 b_brand_BestValue 0.22656 0.20379 -0.38604 -0.35824 b_brand_Supermarket 0.23535 0.23614 -0.38756 -0.38261 b_brand_PainAway 0.17630 0.20691 -0.30674 -0.27603 b_country_CH 1.00000 0.47309 -0.03441 -0.10016 b_country_DK 0.47309 1.00000 0.01636 -0.01482 b_country_IND -0.03441 0.01636 1.00000 0.46383 b_country_RUS -0.10016 -0.01482 0.46383 1.00000 b_country_BRA -0.07272 -0.04269 0.52266 0.52135 b_char_fast 0.16596 0.08541 -0.09988 -0.19295 b_char_double 0.11556 0.02336 -0.10223 -0.16409 b_risk -0.12036 -0.05072 0.11250 0.21418 b_price -0.20181 -0.08419 0.11427 0.22881 scale_2 -0.19708 -0.09381 0.14887 0.25985 scale_3 -0.11465 -0.10697 0.07653 0.19013 b_country_BRA b_char_fast b_char_double b_risk b_brand_Novum 0.06849 -0.09984 -0.04008 0.04865 b_brand_BestValue -0.35584 -0.02225 0.12659 -0.13364 b_brand_Supermarket -0.40690 0.05465 0.18855 -0.19738 b_brand_PainAway -0.28756 -0.09045 0.02796 0.01599 b_country_CH -0.07272 0.16596 0.11556 -0.12036 b_country_DK -0.04269 0.08541 0.02336 -0.05072 b_country_IND 0.52266 -0.09988 -0.10223 0.11250 b_country_RUS 0.52135 -0.19295 -0.16409 0.21418 b_country_BRA 1.00000 -0.15502 -0.15436 0.13095 b_char_fast -0.15502 1.00000 0.47424 -0.22719 b_char_double -0.15436 0.47424 1.00000 -0.16420 b_risk 0.13095 -0.22719 -0.16420 1.00000 b_price 0.18682 -0.30412 -0.25450 0.31680 scale_2 0.19363 -0.33610 -0.31121 0.48283 scale_3 0.12942 -0.24641 -0.12438 0.38837 b_price scale_2 scale_3 b_brand_Novum 0.11316 0.10230 0.08362 b_brand_BestValue 0.24560 -0.01841 -0.01843 b_brand_Supermarket 0.17107 -0.13071 -0.05032 b_brand_PainAway 0.35133 0.14628 0.09838 b_country_CH -0.20181 -0.19708 -0.11465 b_country_DK -0.08419 -0.09381 -0.10697 b_country_IND 0.11427 0.14887 0.07653 b_country_RUS 0.22881 0.25985 0.19013 b_country_BRA 0.18682 0.19363 0.12942 b_char_fast -0.30412 -0.33610 -0.24641 b_char_double -0.25450 -0.31121 -0.12438 b_risk 0.31680 0.48283 0.38837 b_price 1.00000 0.42357 0.25532 scale_2 0.42357 1.00000 0.29398 scale_3 0.25532 0.29398 1.00000 20 worst outliers in terms of lowest average per choice prediction: ID Avg prob per choice 875 0.01871643 367 0.02301562 859 0.02474603 593 0.02482655 678 0.02796424 1000 0.02836584 70 0.02958306 933 0.02988470 947 0.03009565 524 0.03026855 565 0.03048194 472 0.03059124 832 0.03062467 969 0.03108798 240 0.03131049 8 0.03162532 705 0.03182738 605 0.03232399 144 0.03275882 288 0.03282635 Changes in parameter estimates from starting values: Initial Estimate Difference b_brand_Artemis 0.000 0.000000 0.000000 b_brand_Novum 0.000 -0.285093 -0.285093 b_brand_BestValue 0.000 -0.562423 -0.562423 b_brand_Supermarket 0.000 -0.285281 -0.285281 b_brand_PainAway 0.000 -1.158687 -1.158687 b_country_CH 0.000 0.585662 0.585662 b_country_DK 0.000 0.283654 0.283654 b_country_USA 0.000 0.000000 0.000000 b_country_IND 0.000 -0.279773 -0.279773 b_country_RUS 0.000 -0.852014 -0.852014 b_country_BRA 0.000 -0.612893 -0.612893 b_char_standard 0.000 0.000000 0.000000 b_char_fast 0.000 0.708303 0.708303 b_char_double 0.000 1.120392 1.120392 b_risk 0.000 -0.001533 -0.001533 b_price 0.000 -0.703407 -0.703407 scale_1 1.000 1.000000 0.000000 scale_2 1.000 0.760852 -0.239148 scale_3 1.000 0.455253 -0.544747 Settings and functions used in model definition: apollo_control -------------- Value modelName "EL" modelDescr "Exploded logit model on drug choice data" indivID "ID" outputDirectory "output/" debug "FALSE" nCores "1" workInLogs "FALSE" seed "13" mixing "FALSE" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical second derivative of LL (using numDeriv) Scaling in estimation --------------------- Value b_brand_Novum 0.285091412 b_brand_BestValue 0.562424229 b_brand_Supermarket 0.285282029 b_brand_PainAway 1.158701478 b_country_CH 0.585664221 b_country_DK 0.283655018 b_country_IND 0.279772960 b_country_RUS 0.852021585 b_country_BRA 0.612896021 b_char_fast 0.708300202 b_char_double 1.120411245 b_risk 0.001533007 b_price 0.703387144 scale_2 0.760855477 scale_3 0.455254843 Scaling used in computing Hessian --------------------------------- Value b_brand_Novum 0.285092819 b_brand_BestValue 0.562422798 b_brand_Supermarket 0.285281439 b_brand_PainAway 1.158687139 b_country_CH 0.585662152 b_country_DK 0.283654422 b_country_IND 0.279772712 b_country_RUS 0.852014453 b_country_BRA 0.612892896 b_char_fast 0.708303456 b_char_double 1.120392489 b_risk 0.001533005 b_price 0.703406610 scale_2 0.760852250 scale_3 0.455253275 apollo_probabilities ---------------------- function(apollo_beta, apollo_inputs, functionality="estimate"){ ### Attach inputs and detach after function exit apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) ### Create list of probabilities P P = list() ### List of utilities: these must use the same names as in el_settings, order is irrelevant V = list() V[["alt1"]] = ( b_brand_Artemis*(brand_1=="Artemis") + b_brand_Novum*(brand_1=="Novum") + b_country_CH*(country_1=="Switzerland") + b_country_DK*(country_1=="Denmark") + b_country_USA*(country_1=="USA") + b_char_standard*(char_1=="standard") + b_char_fast*(char_1=="fast acting") + b_char_double*(char_1=="double strength") + b_risk*side_effects_1 + b_price*price_1) V[["alt2"]] = ( b_brand_Artemis*(brand_2=="Artemis") + b_brand_Novum*(brand_2=="Novum") + b_country_CH*(country_2=="Switzerland") + b_country_DK*(country_2=="Denmark") + b_country_USA*(country_2=="USA") + b_char_standard*(char_2=="standard") + b_char_fast*(char_2=="fast acting") + b_char_double*(char_2=="double strength") + b_risk*side_effects_2 + b_price*price_2) V[["alt3"]] = ( b_brand_BestValue*(brand_3=="BestValue") + b_brand_Supermarket*(brand_3=="Supermarket") + b_brand_PainAway*(brand_3=="PainAway") + b_country_USA*(country_3=="USA") + b_country_IND*(country_3=="India") + b_country_RUS*(country_3=="Russia") + b_country_BRA*(country_3=="Brazil") + b_char_standard*(char_3=="standard") + b_char_fast*(char_3=="fast acting") + b_risk*side_effects_3 + b_price*price_3 ) V[["alt4"]] = ( b_brand_BestValue*(brand_4=="BestValue") + b_brand_Supermarket*(brand_4=="Supermarket") + b_brand_PainAway*(brand_4=="PainAway") + b_country_USA*(country_4=="USA") + b_country_IND*(country_4=="India") + b_country_RUS*(country_4=="Russia") + b_country_BRA*(country_4=="Brazil") + b_char_standard*(char_4=="standard") + b_char_fast*(char_4=="fast acting") + b_risk*side_effects_4 + b_price*price_4 ) ### Define settings for exploded logit el_settings = list( alternatives = c(alt1=1, alt2=2, alt3=3, alt4=4), avail = list(alt1=1, alt2=1, alt3=1, alt4=1), choiceVars = list(best, second_pref, third_pref), utilities = V, scales = list(scale_1,scale_2,scale_3) ) ### Compute exploded logit probabilities P[["model"]]=apollo_el(el_settings, functionality) ### Take product across observation for same individual P = apollo_panelProd(P, apollo_inputs, functionality) ### Prepare and return outputs of function P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }