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 Model description : Mixed logit model on Swiss route choice data, uncorrelated Lognormals in preference space Model run at : 2025-09-19 12:00:40.351814 Estimation method : bgw Estimation diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -28.523356 reciprocal of condition number : 0.0571593 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) : -2253.78 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : -2420.39 LL(final) : -1445.69 Rho-squared vs equal shares : 0.4027 Adj.Rho-squared vs equal shares : 0.3994 Rho-squared vs observed shares : 0.4027 Adj.Rho-squared vs observed shares : 0.3998 AIC : 2907.38 BIC : 2956.65 Estimated parameters : 8 Time taken (hh:mm:ss) : 00:00:31.08 pre-estimation : 00:00:7.77 estimation : 00:00:6.67 post-estimation : 00:00:16.64 Iterations : 16 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) mu_log_b_tt -1.9962 0.09023 -22.124 0.12228 -16.325 sigma_log_b_tt 0.4801 0.07175 6.691 0.06594 7.281 mu_log_b_tc -1.0298 0.15127 -6.808 0.21132 -4.873 sigma_log_b_tc -0.9499 0.10571 -8.986 0.13089 -7.257 mu_log_b_hw -2.9450 0.08497 -34.658 0.09105 -32.346 sigma_log_b_hw 0.8180 0.11322 7.225 0.12725 6.429 mu_log_b_ch 0.6271 0.07579 8.274 0.08651 7.249 sigma_log_b_ch -0.8480 0.12901 -6.573 0.17671 -4.799 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_tc mu_log_b_hw mu_log_b_tt 0.008141 -0.001978 0.009757 0.003603 0.001766 sigma_log_b_tt -0.001978 0.005148 -0.001226 -8.0561e-04 5.4448e-04 mu_log_b_tc 0.009757 -0.001226 0.022884 0.009812 0.001845 sigma_log_b_tc 0.003603 -8.0561e-04 0.009812 0.011175 -4.7579e-04 mu_log_b_hw 0.001766 5.4448e-04 0.001845 -4.7579e-04 0.007221 sigma_log_b_hw 0.001112 -6.8017e-04 1.3061e-04 3.8990e-04 -0.002420 mu_log_b_ch 0.002293 2.9494e-04 0.002039 2.6906e-04 0.001285 sigma_log_b_ch -0.002793 8.1593e-04 -0.003323 -0.003374 -5.2526e-04 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.001112 0.002293 -0.002793 sigma_log_b_tt -6.8017e-04 2.9494e-04 8.1593e-04 mu_log_b_tc 1.3061e-04 0.002039 -0.003323 sigma_log_b_tc 3.8990e-04 2.6906e-04 -0.003374 mu_log_b_hw -0.002420 0.001285 -5.2526e-04 sigma_log_b_hw 0.012818 0.001729 -0.002369 mu_log_b_ch 0.001729 0.005744 -0.001636 sigma_log_b_ch -0.002369 -0.001636 0.016643 Robust covariance matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 0.014951 -0.003337 0.022229 0.008952 0.003699 sigma_log_b_tt -0.003337 0.004347 -0.004844 -0.003174 1.2331e-04 mu_log_b_tc 0.022229 -0.004844 0.044658 0.018713 0.004335 sigma_log_b_tc 0.008952 -0.003174 0.018713 0.017131 -4.3007e-04 mu_log_b_hw 0.003699 1.2331e-04 0.004335 -4.3007e-04 0.008290 sigma_log_b_hw 0.001079 -0.001359 1.903e-05 0.002960 -0.002776 mu_log_b_ch 0.005318 -4.3117e-04 0.006426 0.002910 0.002992 sigma_log_b_ch -0.005782 0.002505 -0.008281 -0.011089 5.9006e-04 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.001079 0.005318 -0.005782 sigma_log_b_tt -0.001359 -4.3117e-04 0.002505 mu_log_b_tc 1.903e-05 0.006426 -0.008281 sigma_log_b_tc 0.002960 0.002910 -0.011089 mu_log_b_hw -0.002776 0.002992 5.9006e-04 sigma_log_b_hw 0.016192 0.002381 -0.008300 mu_log_b_ch 0.002381 0.007483 -0.004549 sigma_log_b_ch -0.008300 -0.004549 0.031227 Classical correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 1.0000 -0.30552 0.714901 0.37773 0.23028 sigma_log_b_tt -0.3055 1.00000 -0.112995 -0.10622 0.08931 mu_log_b_tc 0.7149 -0.11299 1.000000 0.61358 0.14356 sigma_log_b_tc 0.3777 -0.10622 0.613584 1.00000 -0.05297 mu_log_b_hw 0.2303 0.08931 0.143556 -0.05297 1.00000 sigma_log_b_hw 0.1089 -0.08373 0.007626 0.03258 -0.25159 mu_log_b_ch 0.3353 0.05424 0.177819 0.03358 0.19951 sigma_log_b_ch -0.2400 0.08815 -0.170268 -0.24737 -0.04791 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.108898 0.33526 -0.23996 sigma_log_b_tt -0.083733 0.05424 0.08815 mu_log_b_tc 0.007626 0.17782 -0.17027 sigma_log_b_tc 0.032577 0.03358 -0.24737 mu_log_b_hw -0.251594 0.19951 -0.04791 sigma_log_b_hw 1.000000 0.20146 -0.16220 mu_log_b_ch 0.201465 1.00000 -0.16727 sigma_log_b_ch -0.162195 -0.16727 1.00000 Robust correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw mu_log_b_tt 1.00000 -0.41391 0.8603 0.55937 0.33222 sigma_log_b_tt -0.41391 1.00000 -0.3476 -0.36774 0.02054 mu_log_b_tc 0.86027 -0.34764 1.0000 0.67655 0.22529 sigma_log_b_tc 0.55937 -0.36774 0.6765 1.00000 -0.03609 mu_log_b_hw 0.33222 0.02054 0.2253 -0.03609 1.00000 sigma_log_b_hw 0.06938 -0.16201 7.0770e-04 0.17773 -0.23964 mu_log_b_ch 0.50272 -0.07559 0.3515 0.25702 0.37985 sigma_log_b_ch -0.26760 0.21503 -0.2217 -0.47944 0.03667 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.06938 0.50272 -0.26760 sigma_log_b_tt -0.16201 -0.07559 0.21503 mu_log_b_tc 7.0770e-04 0.35150 -0.22175 sigma_log_b_tc 0.17773 0.25702 -0.47944 mu_log_b_hw -0.23964 0.37985 0.03667 sigma_log_b_hw 1.00000 0.21626 -0.36912 mu_log_b_ch 0.21626 1.00000 -0.29755 sigma_log_b_ch -0.36912 -0.29755 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 15174 0.2580518 16178 0.2586205 23205 0.2735466 22580 0.2758596 21623 0.2957468 76862 0.3263382 16489 0.3392731 12534 0.3496089 21922 0.3514268 16184 0.3664990 15056 0.3673345 22820 0.3789472 20100 0.3805183 16617 0.3831291 24627 0.3840706 22961 0.3856301 15312 0.3861518 14754 0.3929183 17187 0.4030154 17645 0.4065215 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Mixed logit model on Swiss route choice data, uncorrelated Lognormals in preference space" indivID "ID" nCores "4" outputDirectory "output/" mixing "TRUE" debug "FALSE" modelName "MMNL_preference_space" 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.9961769 sigma_log_b_tt 0.4800604 mu_log_b_tc 1.0298016 sigma_log_b_tc 0.9498857 mu_log_b_hw 2.9450139 sigma_log_b_hw 0.8180326 mu_log_b_ch 0.6270697 sigma_log_b_ch 0.8480160 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_tc * draws_tc ) randcoeff[["b_hw"]] = -exp( mu_log_b_hw + sigma_log_b_hw * draws_hw ) randcoeff[["b_ch"]] = -exp( mu_log_b_ch + 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) }