Model run by stephane.hess using Apollo 0.3.6 on R 4.5.1 for Darwin. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : MMNL_preference_space_correlated Model description : Mixed logit model on Swiss route choice data, correlated Lognormals in utility space Model run at : 2025-09-19 12:02:07.258564 Estimation method : bgw Estimation diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -7.616865 reciprocal of condition number : 0.000149922 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 4 Number of inter-individual draws : 500 (halton) LL(start) : -1445.36 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : -2420.39 LL(final) : -1406.94 Rho-squared vs equal shares : 0.4187 Adj.Rho-squared vs equal shares : 0.4129 Rho-squared vs observed shares : 0.4187 Adj.Rho-squared vs observed shares : 0.4133 AIC : 2841.88 BIC : 2928.1 Estimated parameters : 14 Time taken (hh:mm:ss) : 00:01:3.31 pre-estimation : 00:00:8.09 estimation : 00:00:16.23 post-estimation : 00:00:38.99 Iterations : 29 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) mu_log_b_tt -1.4234 0.13928 -10.220 0.13536 -10.516 sigma_log_b_tt 1.3103 0.15588 8.406 0.14749 8.884 mu_log_b_tc -0.5216 0.18370 -2.839 0.21384 -2.439 sigma_log_b_tt_tc 1.6619 0.16523 10.058 0.16487 10.080 sigma_log_b_tc -0.8593 0.04739 -18.133 0.04779 -17.981 mu_log_b_hw -2.4375 0.14115 -17.268 0.14189 -17.179 sigma_log_b_tt_hw 0.7756 0.16241 4.776 0.15782 4.915 sigma_log_b_tc_hw -0.1862 0.05868 -3.174 0.03715 -5.013 sigma_log_b_hw 0.9432 0.11285 8.358 0.15337 6.150 mu_log_b_ch 1.0970 0.13218 8.299 0.12768 8.592 sigma_log_b_tt_ch 1.0988 0.16104 6.823 0.15167 7.245 sigma_log_b_tc_ch -0.1437 0.05188 -2.770 0.04425 -3.248 sigma_log_b_hw_ch 0.3148 0.07444 4.228 0.08790 3.581 sigma_log_b_ch -0.8563 0.05852 -14.632 0.04930 -17.370 Overview of choices for MNL model component : alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Classical covariance matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tt_tc mu_log_b_tt 0.019400 0.009936 0.021790 0.009361 sigma_log_b_tt 0.009936 0.024298 0.008925 0.024783 mu_log_b_tc 0.021790 0.008925 0.033746 0.004385 sigma_log_b_tt_tc 0.009361 0.024783 0.004385 0.027301 sigma_log_b_tc 7.4574e-04 -5.1443e-04 0.003384 -0.001858 mu_log_b_hw 0.014006 0.013009 0.015546 0.012965 sigma_log_b_tt_hw 0.013441 0.021740 0.014854 0.021865 sigma_log_b_tc_hw 3.2582e-04 9.0191e-04 -0.001145 0.001284 sigma_log_b_hw -0.001307 0.001477 -0.006708 0.003467 mu_log_b_ch 0.014473 0.011968 0.014827 0.012026 sigma_log_b_tt_ch 0.012027 0.023662 0.010569 0.025130 sigma_log_b_tc_ch -2.7429e-04 5.7631e-04 -5.1197e-04 4.252e-05 sigma_log_b_hw_ch -0.001264 7.4756e-04 -0.005500 0.002754 sigma_log_b_ch -8.9346e-04 -6.7474e-04 -0.001393 2.162e-05 sigma_log_b_tc mu_log_b_hw sigma_log_b_tt_hw sigma_log_b_tc_hw mu_log_b_tt 7.4574e-04 0.014006 0.013441 3.2582e-04 sigma_log_b_tt -5.1443e-04 0.013009 0.021740 9.0191e-04 mu_log_b_tc 0.003384 0.015546 0.014854 -0.001145 sigma_log_b_tt_tc -0.001858 0.012965 0.021865 0.001284 sigma_log_b_tc 0.002246 -1.5674e-04 -8.048e-05 3.2204e-04 mu_log_b_hw -1.5674e-04 0.019924 0.013465 8.460e-05 sigma_log_b_tt_hw -8.048e-05 0.013465 0.026378 2.6091e-04 sigma_log_b_tc_hw 3.2204e-04 8.460e-05 2.6091e-04 0.003443 sigma_log_b_hw -0.001827 -0.003882 -0.004628 0.001723 mu_log_b_ch -7.2741e-04 0.013298 0.011834 6.9351e-04 sigma_log_b_tt_ch -0.001091 0.014234 0.023758 2.0628e-04 sigma_log_b_tc_ch 0.001037 -9.6454e-04 -9.5723e-04 0.001089 sigma_log_b_hw_ch -0.001294 -6.3477e-04 -0.001981 0.001448 sigma_log_b_ch 3.466e-05 3.3123e-04 4.9943e-04 -4.1798e-04 sigma_log_b_hw mu_log_b_ch sigma_log_b_tt_ch sigma_log_b_tc_ch mu_log_b_tt -0.001307 0.014473 0.012027 -2.7429e-04 sigma_log_b_tt 0.001477 0.011968 0.023662 5.7631e-04 mu_log_b_tc -0.006708 0.014827 0.010569 -5.1197e-04 sigma_log_b_tt_tc 0.003467 0.012026 0.025130 4.252e-05 sigma_log_b_tc -0.001827 -7.2741e-04 -0.001091 0.001037 mu_log_b_hw -0.003882 0.013298 0.014234 -9.6454e-04 sigma_log_b_tt_hw -0.004628 0.011834 0.023758 -9.5723e-04 sigma_log_b_tc_hw 0.001723 6.9351e-04 2.0628e-04 0.001089 sigma_log_b_hw 0.012734 0.002189 -3.5426e-04 0.001265 mu_log_b_ch 0.002189 0.017471 0.011276 8.415e-06 sigma_log_b_tt_ch -3.5426e-04 0.011276 0.025935 -7.8471e-04 sigma_log_b_tc_ch 0.001265 8.415e-06 -7.8471e-04 0.002691 sigma_log_b_hw_ch 0.006134 4.5482e-04 3.6525e-04 -2.6493e-04 sigma_log_b_ch -0.001640 -3.0518e-04 3.7428e-04 -0.001480 sigma_log_b_hw_ch sigma_log_b_ch mu_log_b_tt -0.001264 -8.9346e-04 sigma_log_b_tt 7.4756e-04 -6.7474e-04 mu_log_b_tc -0.005500 -0.001393 sigma_log_b_tt_tc 0.002754 2.162e-05 sigma_log_b_tc -0.001294 3.466e-05 mu_log_b_hw -6.3477e-04 3.3123e-04 sigma_log_b_tt_hw -0.001981 4.9943e-04 sigma_log_b_tc_hw 0.001448 -4.1798e-04 sigma_log_b_hw 0.006134 -0.001640 mu_log_b_ch 4.5482e-04 -3.0518e-04 sigma_log_b_tt_ch 3.6525e-04 3.7428e-04 sigma_log_b_tc_ch -2.6493e-04 -0.001480 sigma_log_b_hw_ch 0.005542 2.9274e-04 sigma_log_b_ch 2.9274e-04 0.003425 Robust covariance matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tt_tc mu_log_b_tt 0.018323 0.007452 0.023388 0.005922 sigma_log_b_tt 0.007452 0.021752 0.004914 0.022948 mu_log_b_tc 0.023388 0.004914 0.045727 -0.003559 sigma_log_b_tt_tc 0.005922 0.022948 -0.003559 0.027183 sigma_log_b_tc 0.001015 -0.001041 0.005996 -0.003281 mu_log_b_hw 0.013398 0.010759 0.017530 0.009893 sigma_log_b_tt_hw 0.012767 0.018390 0.018019 0.017246 sigma_log_b_tc_hw -6.4889e-04 0.001226 -0.003260 0.002003 sigma_log_b_hw -0.004721 0.003759 -0.019784 0.008986 mu_log_b_ch 0.012819 0.010384 0.012611 0.010589 sigma_log_b_tt_ch 0.009955 0.020940 0.008156 0.022537 sigma_log_b_tc_ch -0.001172 5.8491e-04 -0.001675 1.4848e-04 sigma_log_b_hw_ch -0.003102 0.002506 -0.013333 0.006524 sigma_log_b_ch -4.2272e-04 -7.2728e-04 -5.1750e-04 -1.5427e-04 sigma_log_b_tc mu_log_b_hw sigma_log_b_tt_hw sigma_log_b_tc_hw mu_log_b_tt 0.001015 0.013398 0.012767 -6.4889e-04 sigma_log_b_tt -0.001041 0.010759 0.018390 0.001226 mu_log_b_tc 0.005996 0.017530 0.018019 -0.003260 sigma_log_b_tt_tc -0.003281 0.009893 0.017246 0.002003 sigma_log_b_tc 0.002284 4.4815e-04 8.2462e-04 -4.2607e-04 mu_log_b_hw 4.4815e-04 0.020133 0.013182 -0.001007 sigma_log_b_tt_hw 8.2462e-04 0.013182 0.024906 -0.001014 sigma_log_b_tc_hw -4.2607e-04 -0.001007 -0.001014 0.001380 sigma_log_b_hw -0.004440 -0.007617 -0.009078 0.003818 mu_log_b_ch -9.4055e-04 0.011502 0.009086 8.8332e-04 sigma_log_b_tt_ch -0.001273 0.012769 0.021476 1.2227e-04 sigma_log_b_tc_ch 6.0703e-04 -0.001770 -0.002064 8.9450e-04 sigma_log_b_hw_ch -0.003067 -0.002467 -0.004140 0.002119 sigma_log_b_ch -4.003e-05 0.001081 0.001372 -6.0885e-04 sigma_log_b_hw mu_log_b_ch sigma_log_b_tt_ch sigma_log_b_tc_ch mu_log_b_tt -0.004721 0.012819 0.009955 -0.001172 sigma_log_b_tt 0.003759 0.010384 0.020940 5.8491e-04 mu_log_b_tc -0.019784 0.012611 0.008156 -0.001675 sigma_log_b_tt_tc 0.008986 0.010589 0.022537 1.4848e-04 sigma_log_b_tc -0.004440 -9.4055e-04 -0.001273 6.0703e-04 mu_log_b_hw -0.007617 0.011502 0.012769 -0.001770 sigma_log_b_tt_hw -0.009078 0.009086 0.021476 -0.002064 sigma_log_b_tc_hw 0.003818 8.8332e-04 1.2227e-04 8.9450e-04 sigma_log_b_hw 0.023521 0.003935 -6.6218e-04 0.002975 mu_log_b_ch 0.003935 0.016302 0.009280 1.5222e-04 sigma_log_b_tt_ch -6.6218e-04 0.009280 0.023003 -0.001344 sigma_log_b_tc_ch 0.002975 1.5222e-04 -0.001344 0.001958 sigma_log_b_hw_ch 0.012052 0.001318 0.001061 6.4231e-04 sigma_log_b_ch -0.003114 -6.3873e-04 6.6404e-04 -0.001504 sigma_log_b_hw_ch sigma_log_b_ch mu_log_b_tt -0.003102 -4.2272e-04 sigma_log_b_tt 0.002506 -7.2728e-04 mu_log_b_tc -0.013333 -5.1750e-04 sigma_log_b_tt_tc 0.006524 -1.5427e-04 sigma_log_b_tc -0.003067 -4.003e-05 mu_log_b_hw -0.002467 0.001081 sigma_log_b_tt_hw -0.004140 0.001372 sigma_log_b_tc_hw 0.002119 -6.0885e-04 sigma_log_b_hw 0.012052 -0.003114 mu_log_b_ch 0.001318 -6.3873e-04 sigma_log_b_tt_ch 0.001061 6.6404e-04 sigma_log_b_tc_ch 6.4231e-04 -0.001504 sigma_log_b_hw_ch 0.007727 -5.2411e-04 sigma_log_b_ch -5.2411e-04 0.002430 Classical correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tt_tc mu_log_b_tt 1.00000 0.45762 0.85162 0.406761 sigma_log_b_tt 0.45762 1.00000 0.31169 0.962216 mu_log_b_tc 0.85162 0.31169 1.00000 0.144476 sigma_log_b_tt_tc 0.40676 0.96222 0.14448 1.000000 sigma_log_b_tc 0.11299 -0.06964 0.38869 -0.237353 mu_log_b_hw 0.71240 0.59123 0.59955 0.555912 sigma_log_b_tt_hw 0.59417 0.85873 0.49786 0.814766 sigma_log_b_tc_hw 0.03986 0.09860 -0.10618 0.132390 sigma_log_b_hw -0.08317 0.08395 -0.32359 0.185956 mu_log_b_ch 0.78616 0.58085 0.61063 0.550659 sigma_log_b_tt_ch 0.53619 0.94257 0.35725 0.944427 sigma_log_b_tc_ch -0.03796 0.07127 -0.05372 0.004960 sigma_log_b_hw_ch -0.12191 0.06442 -0.40215 0.223888 sigma_log_b_ch -0.10961 -0.07396 -0.12960 0.002236 sigma_log_b_tc mu_log_b_hw sigma_log_b_tt_hw sigma_log_b_tc_hw mu_log_b_tt 0.11299 0.71240 0.59417 0.03986 sigma_log_b_tt -0.06964 0.59123 0.85873 0.09860 mu_log_b_tc 0.38869 0.59955 0.49786 -0.10618 sigma_log_b_tt_tc -0.23735 0.55591 0.81477 0.13239 sigma_log_b_tc 1.00000 -0.02343 -0.01046 0.11581 mu_log_b_hw -0.02343 1.00000 0.58733 0.01021 sigma_log_b_tt_hw -0.01046 0.58733 1.00000 0.02738 sigma_log_b_tc_hw 0.11581 0.01021 0.02738 1.00000 sigma_log_b_hw -0.34164 -0.24374 -0.25251 0.26026 mu_log_b_ch -0.11613 0.71276 0.55125 0.08941 sigma_log_b_tt_ch -0.14297 0.62615 0.90832 0.02183 sigma_log_b_tc_ch 0.42189 -0.13172 -0.11361 0.35772 sigma_log_b_hw_ch -0.36668 -0.06041 -0.16381 0.33147 sigma_log_b_ch 0.01250 0.04010 0.05254 -0.12171 sigma_log_b_hw mu_log_b_ch sigma_log_b_tt_ch sigma_log_b_tc_ch mu_log_b_tt -0.08317 0.786156 0.53619 -0.037959 sigma_log_b_tt 0.08395 0.580852 0.94257 0.071266 mu_log_b_tc -0.32359 0.610630 0.35725 -0.053721 sigma_log_b_tt_tc 0.18596 0.550659 0.94443 0.004960 sigma_log_b_tc -0.34164 -0.116135 -0.14297 0.421894 mu_log_b_hw -0.24374 0.712762 0.62615 -0.131719 sigma_log_b_tt_hw -0.25251 0.551247 0.90832 -0.113608 sigma_log_b_tc_hw 0.26026 0.089413 0.02183 0.357724 sigma_log_b_hw 1.00000 0.146780 -0.01949 0.216149 mu_log_b_ch 0.14678 1.000000 0.52973 0.001227 sigma_log_b_tt_ch -0.01949 0.529729 1.00000 -0.093926 sigma_log_b_tc_ch 0.21615 0.001227 -0.09393 1.000000 sigma_log_b_hw_ch 0.73016 0.046223 0.03047 -0.068599 sigma_log_b_ch -0.24838 -0.039453 0.03971 -0.487527 sigma_log_b_hw_ch sigma_log_b_ch mu_log_b_tt -0.12191 -0.109609 sigma_log_b_tt 0.06442 -0.073964 mu_log_b_tc -0.40215 -0.129595 sigma_log_b_tt_tc 0.22389 0.002236 sigma_log_b_tc -0.36668 0.012498 mu_log_b_hw -0.06041 0.040098 sigma_log_b_tt_hw -0.16381 0.052544 sigma_log_b_tc_hw 0.33147 -0.121713 sigma_log_b_hw 0.73016 -0.248381 mu_log_b_ch 0.04622 -0.039453 sigma_log_b_tt_ch 0.03047 0.039713 sigma_log_b_tc_ch -0.06860 -0.487527 sigma_log_b_hw_ch 1.00000 0.067193 sigma_log_b_ch 0.06719 1.000000 Robust correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tt_tc mu_log_b_tt 1.00000 0.37325 0.80801 0.26534 sigma_log_b_tt 0.37325 1.00000 0.15583 0.94373 mu_log_b_tc 0.80801 0.15583 1.00000 -0.10095 sigma_log_b_tt_tc 0.26534 0.94373 -0.10095 1.00000 sigma_log_b_tc 0.15691 -0.14769 0.58675 -0.41642 mu_log_b_hw 0.69755 0.51411 0.57776 0.42286 sigma_log_b_tt_hw 0.59762 0.79010 0.53393 0.66281 sigma_log_b_tc_hw -0.12905 0.22386 -0.41042 0.32706 sigma_log_b_hw -0.22742 0.16617 -0.60325 0.35538 mu_log_b_ch 0.74172 0.55146 0.46190 0.50301 sigma_log_b_tt_ch 0.48493 0.93613 0.25146 0.90125 sigma_log_b_tc_ch -0.19571 0.08963 -0.17707 0.02035 sigma_log_b_hw_ch -0.26073 0.19330 -0.70932 0.45014 sigma_log_b_ch -0.06335 -0.10003 -0.04909 -0.01898 sigma_log_b_tc mu_log_b_hw sigma_log_b_tt_hw sigma_log_b_tc_hw mu_log_b_tt 0.15691 0.69755 0.5976 -0.12905 sigma_log_b_tt -0.14769 0.51411 0.7901 0.22386 mu_log_b_tc 0.58675 0.57776 0.5339 -0.41042 sigma_log_b_tt_tc -0.41642 0.42286 0.6628 0.32706 sigma_log_b_tc 1.00000 0.06609 0.1093 -0.24001 mu_log_b_hw 0.06609 1.00000 0.5887 -0.19107 sigma_log_b_tt_hw 0.10934 0.58868 1.0000 -0.17291 sigma_log_b_tc_hw -0.24001 -0.19107 -0.1729 1.00000 sigma_log_b_hw -0.60581 -0.35002 -0.3751 0.67009 mu_log_b_ch -0.15415 0.63491 0.4509 0.18624 sigma_log_b_tt_ch -0.17557 0.59334 0.8973 0.02170 sigma_log_b_tc_ch 0.28706 -0.28193 -0.2956 0.54419 sigma_log_b_hw_ch -0.73017 -0.19780 -0.2984 0.64889 sigma_log_b_ch -0.01699 0.15451 0.1763 -0.33248 sigma_log_b_hw mu_log_b_ch sigma_log_b_tt_ch sigma_log_b_tc_ch mu_log_b_tt -0.22742 0.74172 0.48493 -0.19571 sigma_log_b_tt 0.16617 0.55146 0.93613 0.08963 mu_log_b_tc -0.60325 0.46190 0.25146 -0.17707 sigma_log_b_tt_tc 0.35538 0.50301 0.90125 0.02035 sigma_log_b_tc -0.60581 -0.15415 -0.17557 0.28706 mu_log_b_hw -0.35002 0.63491 0.59334 -0.28193 sigma_log_b_tt_hw -0.37505 0.45093 0.89725 -0.29558 sigma_log_b_tc_hw 0.67009 0.18624 0.02170 0.54419 sigma_log_b_hw 1.00000 0.20093 -0.02847 0.43845 mu_log_b_ch 0.20093 1.00000 0.47924 0.02694 sigma_log_b_tt_ch -0.02847 0.47924 1.00000 -0.20028 sigma_log_b_tc_ch 0.43845 0.02694 -0.20028 1.00000 sigma_log_b_hw_ch 0.89394 0.11742 0.07955 0.16513 sigma_log_b_ch -0.41192 -0.10148 0.08881 -0.68933 sigma_log_b_hw_ch sigma_log_b_ch mu_log_b_tt -0.26073 -0.06335 sigma_log_b_tt 0.19330 -0.10003 mu_log_b_tc -0.70932 -0.04909 sigma_log_b_tt_tc 0.45014 -0.01898 sigma_log_b_tc -0.73017 -0.01699 mu_log_b_hw -0.19780 0.15451 sigma_log_b_tt_hw -0.29841 0.17634 sigma_log_b_tc_hw 0.64889 -0.33248 sigma_log_b_hw 0.89394 -0.41192 mu_log_b_ch 0.11742 -0.10148 sigma_log_b_tt_ch 0.07955 0.08881 sigma_log_b_tc_ch 0.16513 -0.68933 sigma_log_b_hw_ch 1.00000 -0.12094 sigma_log_b_ch -0.12094 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 23205 0.3387942 22580 0.3400254 15174 0.3467477 16178 0.3519480 16489 0.3692086 76862 0.3692238 16617 0.3749573 21623 0.3804847 15056 0.3883965 22961 0.3886681 21922 0.3934653 22820 0.3944174 20100 0.3964667 17187 0.4002780 15312 0.4078253 16184 0.4120079 12534 0.4123512 17645 0.4154704 24627 0.4188538 20352 0.4259477 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Mixed logit model on Swiss route choice data, correlated Lognormals in utility space" indivID "ID" nCores "4" outputDirectory "output/" mixing "TRUE" debug "FALSE" modelName "MMNL_preference_space_correlated" workInLogs "FALSE" seed "13" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" memorySaver "FALSE" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient Scaling used in computing Hessian --------------------------------- Value mu_log_b_tt 1.4234270 sigma_log_b_tt 1.3102604 mu_log_b_tc 0.5216047 sigma_log_b_tt_tc 1.6619439 sigma_log_b_tc 0.8592740 mu_log_b_hw 2.4374935 sigma_log_b_tt_hw 0.7756194 sigma_log_b_tc_hw 0.1862292 sigma_log_b_hw 0.9431559 mu_log_b_ch 1.0969943 sigma_log_b_tt_ch 1.0988306 sigma_log_b_tc_ch 0.1437223 sigma_log_b_hw_ch 0.3147511 sigma_log_b_ch 0.8562828 apollo_randCoeff ------------------ function(apollo_beta, apollo_inputs){ randcoeff = list() randcoeff[["b_tt"]] = -exp( mu_log_b_tt + sigma_log_b_tt * draws_tt ) randcoeff[["b_tc"]] = -exp( mu_log_b_tc + sigma_log_b_tt_tc * draws_tt + sigma_log_b_tc * draws_tc ) randcoeff[["b_hw"]] = -exp( mu_log_b_hw + sigma_log_b_tt_hw * draws_tt + sigma_log_b_tc_hw * draws_tc + sigma_log_b_hw * draws_hw ) randcoeff[["b_ch"]] = -exp( mu_log_b_ch + sigma_log_b_tt_ch * draws_tt + sigma_log_b_tc_ch * draws_tc + sigma_log_b_hw_ch * draws_hw + sigma_log_b_ch * draws_ch ) return(randcoeff) } apollo_probabilities ---------------------- function(apollo_beta, apollo_inputs, functionality="estimate"){ ### Function initialisation: do not change the following three commands ### 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 mnl_settings, order is irrelevant V = list() V[["alt1"]] = b_tt * tt1 + b_tc * tc1 + b_hw * hw1 + b_ch * ch1 V[["alt2"]] = b_tt * tt2 + b_tc * tc2 + b_hw * hw2 + b_ch * ch2 ### Define settings for MNL model component mnl_settings = list( alternatives = c(alt1=1, alt2=2), avail = list(alt1=1, alt2=1), choiceVar = choice, utilities = V ) ### Compute probabilities using MNL model P[["model"]] = apollo_mnl(mnl_settings, functionality) ### Take product across observation for same individual P = apollo_panelProd(P, apollo_inputs, functionality) ### Average across inter-individual draws P = apollo_avgInterDraws(P, apollo_inputs, functionality) ### Prepare and return outputs of function P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }