Model run by stephane.hess using Apollo 0.3.4 on R 4.4.0 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_wtp_space_inter_intra Model description : Mixed logit model on Swiss route choice data, WTP space with correlated and flexible distributions, inter and intra-individual heterogeneity Model run at : 2024-09-27 17:06:45.865669 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -1.103722 reciprocal of condition number : 3.95643e-05 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 : 100 (halton) Number of intra-individual draws : 100 (mlhs) LL(start) : -2406.92 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : -2420.39 LL(final) : -1438.15 Rho-squared vs equal shares : 0.4058 Adj.Rho-squared vs equal shares : 0.4009 Rho-squared vs observed shares : 0.4058 Adj.Rho-squared vs observed shares : 0.4013 AIC : 2900.3 BIC : 2974.2 Estimated parameters : 12 Time taken (hh:mm:ss) : 00:14:58.75 pre-estimation : 00:01:4.64 estimation : 00:03:5.7 post-estimation : 00:10:48.41 Iterations : 23 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_1 -0.06281 0.07890 -0.7961 0.09217 -0.6814 asc_2 0.00000 NA NA NA NA mu_log_b_tc -2.58540 0.24147 -10.7070 0.28127 -9.1917 sigma_log_b_tc_inter 6.01816 0.92857 6.4811 0.90758 6.6310 mu_log_v_tt -1.37562 0.04864 -28.2816 0.05762 -23.8756 sigma_log_v_tt_inter -0.58667 0.03963 -14.8053 0.03342 -17.5521 sigma_log_v_tt_inter_2 0.02368 0.01945 1.2171 0.01175 2.0156 sigma_log_v_tt_intra 0.53996 0.02500 21.5993 0.02981 18.1116 mu_log_v_hw -2.20340 0.09089 -24.2436 0.16220 -13.5844 sigma_log_v_hw_inter -1.05285 0.07136 -14.7535 0.06977 -15.0901 sigma_log_v_hw_v_tt_inter -0.47387 0.07705 -6.1499 0.18074 -2.6218 v_ch 3.93243 0.37418 10.5094 0.87158 4.5118 gamma_vtt_business 2.35055 0.60485 3.8862 1.46821 1.6010 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: asc_1 mu_log_b_tc sigma_log_b_tc_inter asc_1 0.006225 0.001401 -0.007543 mu_log_b_tc 0.001401 0.058306 -0.157904 sigma_log_b_tc_inter -0.007543 -0.157904 0.862239 mu_log_v_tt 1.1582e-04 -0.002286 -0.001421 sigma_log_v_tt_inter -4.087e-05 -9.8645e-04 0.001410 sigma_log_v_tt_inter_2 -4.025e-05 -1.7052e-04 6.5737e-04 sigma_log_v_tt_intra -7.152e-05 9.3324e-04 0.002735 mu_log_v_hw 1.6281e-04 -0.004518 -0.016255 sigma_log_v_hw_inter 8.016e-05 5.7640e-04 -0.013334 sigma_log_v_hw_v_tt_inter 1.0780e-04 -0.004775 -0.010615 v_ch 7.9824e-04 -0.030366 -0.052268 gamma_vtt_business -7.8112e-04 0.039725 0.067283 mu_log_v_tt sigma_log_v_tt_inter sigma_log_v_tt_inter_2 asc_1 1.1582e-04 -4.087e-05 -4.025e-05 mu_log_b_tc -0.002286 -9.8645e-04 -1.7052e-04 sigma_log_b_tc_inter -0.001421 0.001410 6.5737e-04 mu_log_v_tt 0.002366 4.0972e-04 -2.7127e-04 sigma_log_v_tt_inter 4.0972e-04 0.001570 6.1541e-04 sigma_log_v_tt_inter_2 -2.7127e-04 6.1541e-04 3.7838e-04 sigma_log_v_tt_intra -8.7094e-04 1.605e-05 1.5334e-04 mu_log_v_hw 0.001312 -7.123e-05 -1.4756e-04 sigma_log_v_hw_inter 1.4973e-04 -3.1748e-04 -1.6780e-04 sigma_log_v_hw_v_tt_inter 0.001349 4.3662e-04 3.022e-05 v_ch 0.007336 0.002239 3.1359e-04 gamma_vtt_business -0.012889 -0.003736 -3.2047e-04 sigma_log_v_tt_intra mu_log_v_hw sigma_log_v_hw_inter asc_1 -7.152e-05 1.6281e-04 8.016e-05 mu_log_b_tc 9.3324e-04 -0.004518 5.7640e-04 sigma_log_b_tc_inter 0.002735 -0.016255 -0.013334 mu_log_v_tt -8.7094e-04 0.001312 1.4973e-04 sigma_log_v_tt_inter 1.605e-05 -7.123e-05 -3.1748e-04 sigma_log_v_tt_inter_2 1.5334e-04 -1.4756e-04 -1.6780e-04 sigma_log_v_tt_intra 6.2495e-04 -7.0029e-04 -1.6920e-04 mu_log_v_hw -7.0029e-04 0.008260 0.004293 sigma_log_v_hw_inter -1.6920e-04 0.004293 0.005093 sigma_log_v_hw_v_tt_inter -7.7553e-04 0.004473 0.001391 v_ch -0.003888 0.024036 0.004620 gamma_vtt_business 0.007339 -0.028123 -0.004547 sigma_log_v_hw_v_tt_inter v_ch gamma_vtt_business asc_1 1.0780e-04 7.9824e-04 -7.8112e-04 mu_log_b_tc -0.004775 -0.030366 0.039725 sigma_log_b_tc_inter -0.010615 -0.052268 0.067283 mu_log_v_tt 0.001349 0.007336 -0.012889 sigma_log_v_tt_inter 4.3662e-04 0.002239 -0.003736 sigma_log_v_tt_inter_2 3.022e-05 3.1359e-04 -3.2047e-04 sigma_log_v_tt_intra -7.7553e-04 -0.003888 0.007339 mu_log_v_hw 0.004473 0.024036 -0.028123 sigma_log_v_hw_inter 0.001391 0.004620 -0.004547 sigma_log_v_hw_v_tt_inter 0.005937 0.023572 -0.041989 v_ch 0.023572 0.140011 -0.184367 gamma_vtt_business -0.041989 -0.184367 0.365838 Robust covariance matrix: asc_1 mu_log_b_tc sigma_log_b_tc_inter asc_1 0.008496 0.008056 -0.024106 mu_log_b_tc 0.008056 0.079115 -0.079434 sigma_log_b_tc_inter -0.024106 -0.079434 0.823697 mu_log_v_tt -2.6714e-04 -0.009797 -0.012855 sigma_log_v_tt_inter -1.1677e-04 -0.004467 -0.003109 sigma_log_v_tt_inter_2 -2.146e-05 -0.001077 -3.0096e-04 sigma_log_v_tt_intra 1.0780e-04 0.005274 0.008678 mu_log_v_hw -7.4781e-04 -0.028437 -0.056201 sigma_log_v_hw_inter -1.4470e-04 -0.005480 -0.026212 sigma_log_v_hw_v_tt_inter -8.3335e-04 -0.034257 -0.055145 v_ch -0.004199 -0.169507 -0.252799 gamma_vtt_business 0.006641 0.279210 0.419632 mu_log_v_tt sigma_log_v_tt_inter sigma_log_v_tt_inter_2 asc_1 -2.6714e-04 -1.1677e-04 -2.146e-05 mu_log_b_tc -0.009797 -0.004467 -0.001077 sigma_log_b_tc_inter -0.012855 -0.003109 -3.0096e-04 mu_log_v_tt 0.003320 0.001332 1.8536e-04 sigma_log_v_tt_inter 0.001332 0.001117 3.3418e-04 sigma_log_v_tt_inter_2 1.8536e-04 3.3418e-04 1.3796e-04 sigma_log_v_tt_intra -0.001618 -5.4165e-04 -6.603e-05 mu_log_v_hw 0.007294 0.002781 5.7153e-04 sigma_log_v_hw_inter 0.001599 3.8928e-04 2.994e-05 sigma_log_v_hw_v_tt_inter 0.008601 0.003468 7.8982e-04 v_ch 0.042364 0.017756 0.004065 gamma_vtt_business -0.070211 -0.028118 -0.006358 sigma_log_v_tt_intra mu_log_v_hw sigma_log_v_hw_inter asc_1 1.0780e-04 -7.4781e-04 -1.4470e-04 mu_log_b_tc 0.005274 -0.028437 -0.005480 sigma_log_b_tc_inter 0.008678 -0.056201 -0.026212 mu_log_v_tt -0.001618 0.007294 0.001599 sigma_log_v_tt_inter -5.4165e-04 0.002781 3.8928e-04 sigma_log_v_tt_inter_2 -6.603e-05 5.7153e-04 2.994e-05 sigma_log_v_tt_intra 8.8882e-04 -0.004158 -9.8649e-04 mu_log_v_hw -0.004158 0.026309 0.008730 sigma_log_v_hw_inter -9.8649e-04 0.008730 0.004868 sigma_log_v_hw_v_tt_inter -0.004958 0.027422 0.007000 v_ch -0.023928 0.132751 0.032266 gamma_vtt_business 0.040509 -0.214386 -0.049330 sigma_log_v_hw_v_tt_inter v_ch gamma_vtt_business asc_1 -8.3335e-04 -0.004199 0.006641 mu_log_b_tc -0.034257 -0.169507 0.279210 sigma_log_b_tc_inter -0.055145 -0.252799 0.419632 mu_log_v_tt 0.008601 0.042364 -0.070211 sigma_log_v_tt_inter 0.003468 0.017756 -0.028118 sigma_log_v_tt_inter_2 7.8982e-04 0.004065 -0.006358 sigma_log_v_tt_intra -0.004958 -0.023928 0.040509 mu_log_v_hw 0.027422 0.132751 -0.214386 sigma_log_v_hw_inter 0.007000 0.032266 -0.049330 sigma_log_v_hw_v_tt_inter 0.032668 0.155658 -0.263970 v_ch 0.155658 0.759653 -1.257616 gamma_vtt_business -0.263970 -1.257616 2.155647 Classical correlation matrix: asc_1 mu_log_b_tc sigma_log_b_tc_inter asc_1 1.00000 0.07353 -0.10296 mu_log_b_tc 0.07353 1.00000 -0.70424 sigma_log_b_tc_inter -0.10296 -0.70424 1.00000 mu_log_v_tt 0.03018 -0.19465 -0.03147 sigma_log_v_tt_inter -0.01307 -0.10310 0.03832 sigma_log_v_tt_inter_2 -0.02622 -0.03630 0.03639 sigma_log_v_tt_intra -0.03626 0.15460 0.11781 mu_log_v_hw 0.02271 -0.20588 -0.19261 sigma_log_v_hw_inter 0.01424 0.03345 -0.20122 sigma_log_v_hw_v_tt_inter 0.01773 -0.25664 -0.14835 v_ch 0.02704 -0.33608 -0.15043 gamma_vtt_business -0.01637 0.27199 0.11980 mu_log_v_tt sigma_log_v_tt_inter sigma_log_v_tt_inter_2 asc_1 0.03018 -0.01307 -0.02622 mu_log_b_tc -0.19465 -0.10310 -0.03630 sigma_log_b_tc_inter -0.03147 0.03832 0.03639 mu_log_v_tt 1.00000 0.21258 -0.28671 sigma_log_v_tt_inter 0.21258 1.00000 0.79841 sigma_log_v_tt_inter_2 -0.28671 0.79841 1.00000 sigma_log_v_tt_intra -0.71626 0.01620 0.31534 mu_log_v_hw 0.29671 -0.01978 -0.08347 sigma_log_v_hw_inter 0.04314 -0.11227 -0.12088 sigma_log_v_hw_v_tt_inter 0.35989 0.14300 0.02016 v_ch 0.40307 0.15103 0.04308 gamma_vtt_business -0.43809 -0.15586 -0.02724 sigma_log_v_tt_intra mu_log_v_hw sigma_log_v_hw_inter asc_1 -0.03626 0.02271 0.01424 mu_log_b_tc 0.15460 -0.20588 0.03345 sigma_log_b_tc_inter 0.11781 -0.19261 -0.20122 mu_log_v_tt -0.71626 0.29671 0.04314 sigma_log_v_tt_inter 0.01620 -0.01978 -0.11227 sigma_log_v_tt_inter_2 0.31534 -0.08347 -0.12088 sigma_log_v_tt_intra 1.00000 -0.30822 -0.09484 mu_log_v_hw -0.30822 1.00000 0.66185 sigma_log_v_hw_inter -0.09484 0.66185 1.00000 sigma_log_v_hw_v_tt_inter -0.40261 0.63872 0.25293 v_ch -0.41564 0.70678 0.17303 gamma_vtt_business 0.48536 -0.51160 -0.10533 sigma_log_v_hw_v_tt_inter v_ch gamma_vtt_business asc_1 0.01773 0.02704 -0.01637 mu_log_b_tc -0.25664 -0.33608 0.27199 sigma_log_b_tc_inter -0.14835 -0.15043 0.11980 mu_log_v_tt 0.35989 0.40307 -0.43809 sigma_log_v_tt_inter 0.14300 0.15103 -0.15586 sigma_log_v_tt_inter_2 0.02016 0.04308 -0.02724 sigma_log_v_tt_intra -0.40261 -0.41564 0.48536 mu_log_v_hw 0.63872 0.70678 -0.51160 sigma_log_v_hw_inter 0.25293 0.17303 -0.10533 sigma_log_v_hw_v_tt_inter 1.00000 0.81757 -0.90095 v_ch 0.81757 1.00000 -0.81462 gamma_vtt_business -0.90095 -0.81462 1.00000 Robust correlation matrix: asc_1 mu_log_b_tc sigma_log_b_tc_inter asc_1 1.00000 0.3107 -0.28816 mu_log_b_tc 0.31073 1.0000 -0.31116 sigma_log_b_tc_inter -0.28816 -0.3112 1.00000 mu_log_v_tt -0.05030 -0.6045 -0.24584 sigma_log_v_tt_inter -0.03790 -0.4752 -0.10248 sigma_log_v_tt_inter_2 -0.01982 -0.3261 -0.02823 sigma_log_v_tt_intra 0.03923 0.6289 0.32073 mu_log_v_hw -0.05002 -0.6233 -0.38177 sigma_log_v_hw_inter -0.02250 -0.2793 -0.41395 sigma_log_v_hw_v_tt_inter -0.05002 -0.6738 -0.33618 v_ch -0.05227 -0.6914 -0.31958 gamma_vtt_business 0.04907 0.6761 0.31492 mu_log_v_tt sigma_log_v_tt_inter sigma_log_v_tt_inter_2 asc_1 -0.05030 -0.03790 -0.01982 mu_log_b_tc -0.60453 -0.47517 -0.32608 sigma_log_b_tc_inter -0.24584 -0.10248 -0.02823 mu_log_v_tt 1.00000 0.69178 0.27390 sigma_log_v_tt_inter 0.69178 1.00000 0.85122 sigma_log_v_tt_inter_2 0.27390 0.85122 1.00000 sigma_log_v_tt_intra -0.94206 -0.54357 -0.18855 mu_log_v_hw 0.78053 0.51295 0.29999 sigma_log_v_hw_inter 0.39787 0.16692 0.03653 sigma_log_v_hw_v_tt_inter 0.82596 0.57408 0.37204 v_ch 0.84360 0.60949 0.39712 gamma_vtt_business -0.82999 -0.57297 -0.36868 sigma_log_v_tt_intra mu_log_v_hw sigma_log_v_hw_inter asc_1 0.03923 -0.05002 -0.02250 mu_log_b_tc 0.62892 -0.62330 -0.27926 sigma_log_b_tc_inter 0.32073 -0.38177 -0.41395 mu_log_v_tt -0.94206 0.78053 0.39787 sigma_log_v_tt_inter -0.54357 0.51295 0.16692 sigma_log_v_tt_inter_2 -0.18855 0.29999 0.03653 sigma_log_v_tt_intra 1.00000 -0.85987 -0.47425 mu_log_v_hw -0.85987 1.00000 0.77137 sigma_log_v_hw_inter -0.47425 0.77137 1.00000 sigma_log_v_hw_v_tt_inter -0.92009 0.93538 0.55508 v_ch -0.92085 0.93903 0.53060 gamma_vtt_business 0.92546 -0.90024 -0.48156 sigma_log_v_hw_v_tt_inter v_ch gamma_vtt_business asc_1 -0.05002 -0.05227 0.04907 mu_log_b_tc -0.67384 -0.69143 0.67610 sigma_log_b_tc_inter -0.33618 -0.31958 0.31492 mu_log_v_tt 0.82596 0.84360 -0.82999 sigma_log_v_tt_inter 0.57408 0.60949 -0.57297 sigma_log_v_tt_inter_2 0.37204 0.39712 -0.36868 sigma_log_v_tt_intra -0.92009 -0.92085 0.92546 mu_log_v_hw 0.93538 0.93903 -0.90024 sigma_log_v_hw_inter 0.55508 0.53060 -0.48156 sigma_log_v_hw_v_tt_inter 1.00000 0.98811 -0.99474 v_ch 0.98811 1.00000 -0.98277 gamma_vtt_business -0.99474 -0.98277 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 15174 0.3595049 23205 0.3617578 76862 0.3735043 16178 0.3800800 22580 0.3857141 14802 0.3867648 15056 0.3929565 22820 0.3945979 22278 0.3975361 16489 0.4031045 82613 0.4037590 18219 0.4053691 80546 0.4075846 17645 0.4137983 20063 0.4167660 14353 0.4168444 22961 0.4197493 21922 0.4214567 12534 0.4225289 16617 0.4294726 Changes in parameter estimates from starting values: Initial Estimate Difference asc_1 0.000 -0.06281 -0.06281 asc_2 0.000 0.00000 0.00000 mu_log_b_tc -3.000 -2.58540 0.41460 sigma_log_b_tc_inter 0.000 6.01816 6.01816 mu_log_v_tt -3.000 -1.37562 1.62438 sigma_log_v_tt_inter 0.000 -0.58667 -0.58667 sigma_log_v_tt_inter_2 0.000 0.02368 0.02368 sigma_log_v_tt_intra 0.000 0.53996 0.53996 mu_log_v_hw -3.000 -2.20340 0.79660 sigma_log_v_hw_inter 0.000 -1.05285 -1.05285 sigma_log_v_hw_v_tt_inter 0.000 -0.47387 -0.47387 v_ch 0.000 3.93243 3.93243 gamma_vtt_business 0.000 2.35055 2.35055 Settings and functions used in model definition: apollo_control -------------- Value modelName "MMNL_wtp_space_inter_intra" modelDescr "Mixed logit model on Swiss route choice data, WTP space with correlated and flexible distributions, inter and intra-individual heterogeneity" indivID "ID" nCores "4" analyticGrad "TRUE" outputDirectory "output/" mixing "TRUE" debug "FALSE" workInLogs "FALSE" seed "13" HB "FALSE" noValidation "FALSE" noDiagnostics "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" memorySaver "FALSE" panelData "TRUE" analyticGrad_manualSet "TRUE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient Scaling used in computing Hessian --------------------------------- Value asc_1 0.06280816 mu_log_b_tc 2.58540162 sigma_log_b_tc_inter 6.01815708 mu_log_v_tt 1.37562408 sigma_log_v_tt_inter 0.58666795 sigma_log_v_tt_inter_2 0.02367501 sigma_log_v_tt_intra 0.53996024 mu_log_v_hw 2.20339772 sigma_log_v_hw_inter 1.05284943 sigma_log_v_hw_v_tt_inter 0.47386636 v_ch 3.93242764 gamma_vtt_business 2.35054783 apollo_randCoeff ------------------ function(apollo_beta, apollo_inputs){ randcoeff = list() randcoeff[["b_tc"]] = -exp( mu_log_b_tc + sigma_log_b_tc_inter * draws_tc_inter ) randcoeff[["v_tt"]] = ( exp( mu_log_v_tt + sigma_log_v_tt_inter * draws_tt_inter + sigma_log_v_tt_inter_2 * draws_tt_inter ^ 2 + sigma_log_v_tt_intra * draws_tt_intra ) * ( gamma_vtt_business * business + ( 1 - business ) ) ) randcoeff[["v_hw"]] = exp( mu_log_v_hw + sigma_log_v_hw_inter * draws_hw_inter + sigma_log_v_hw_v_tt_inter * draws_tt_inter ) 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"]] = asc_1 + b_tc*(v_tt*tt1 + tc1 + v_hw*hw1 + v_ch*ch1) V[["alt2"]] = asc_2 + b_tc*(v_tt*tt2 + tc2 + v_hw*hw2 + v_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) ### Average across intra-individual draws P = apollo_avgIntraDraws(P, apollo_inputs, 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) }