Model run by stephane.hess using Apollo 0.3.5 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_preference_space Model description : Mixed logit model on Swiss route choice data, uncorrelated Lognormals in preference space Model run at : 2025-03-10 17:36:21.198464 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -28.523453 reciprocal of condition number : 0.0571595 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:29.26 pre-estimation : 00:00:7.57 estimation : 00:00:6.21 post-estimation : 00:00:15.49 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.12243 -16.304 sigma_log_b_tt 0.4801 0.07175 6.691 0.06602 7.271 mu_log_b_tc -1.0298 0.15127 -6.808 0.21160 -4.867 sigma_log_b_tc -0.9499 0.10571 -8.986 0.13105 -7.248 mu_log_b_hw -2.9450 0.08497 -34.658 0.09117 -32.304 sigma_log_b_hw 0.8180 0.11322 7.225 0.12741 6.420 mu_log_b_ch 0.6271 0.07579 8.274 0.08662 7.239 sigma_log_b_ch -0.8480 0.12901 -6.573 0.17694 -4.793 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 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.008141 -0.001978 0.009757 0.003603 0.001766 0.001112 0.002293 -0.002793 sigma_log_b_tt -0.001978 0.005148 -0.001226 -8.0562e-04 5.4447e-04 -6.8017e-04 2.9494e-04 8.1593e-04 mu_log_b_tc 0.009757 -0.001226 0.022884 0.009812 0.001845 1.3068e-04 0.002039 -0.003323 sigma_log_b_tc 0.003603 -8.0562e-04 0.009812 0.011175 -4.7579e-04 3.8996e-04 2.6904e-04 -0.003373 mu_log_b_hw 0.001766 5.4447e-04 0.001845 -4.7579e-04 0.007221 -0.002420 0.001285 -5.2523e-04 sigma_log_b_hw 0.001112 -6.8017e-04 1.3068e-04 3.8996e-04 -0.002420 0.012818 0.001729 -0.002369 mu_log_b_ch 0.002293 2.9494e-04 0.002039 2.6904e-04 0.001285 0.001729 0.005744 -0.001635 sigma_log_b_ch -0.002793 8.1593e-04 -0.003323 -0.003373 -5.2523e-04 -0.002369 -0.001635 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 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 0.014990 -0.003346 0.022287 0.008975 0.003708 0.001082 0.005331 -0.005797 sigma_log_b_tt -0.003346 0.004359 -0.004856 -0.003182 1.2363e-04 -0.001363 -4.3229e-04 0.002512 mu_log_b_tc 0.022287 -0.004856 0.044773 0.018761 0.004346 1.930e-05 0.006442 -0.008302 sigma_log_b_tc 0.008975 -0.003182 0.018761 0.017175 -4.3119e-04 0.002968 0.002918 -0.011117 mu_log_b_hw 0.003708 1.2363e-04 0.004346 -4.3119e-04 0.008311 -0.002784 0.002999 5.9163e-04 sigma_log_b_hw 0.001082 -0.001363 1.930e-05 0.002968 -0.002784 0.016234 0.002387 -0.008322 mu_log_b_ch 0.005331 -4.3229e-04 0.006442 0.002918 0.002999 0.002387 0.007503 -0.004560 sigma_log_b_ch -0.005797 0.002512 -0.008302 -0.011117 5.9163e-04 -0.008322 -0.004560 0.031307 Classical correlation matrix: mu_log_b_tt sigma_log_b_tt mu_log_b_tc sigma_log_b_tc mu_log_b_hw sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 1.0000 -0.30552 0.714901 0.37773 0.23028 0.108903 0.33526 -0.23996 sigma_log_b_tt -0.3055 1.00000 -0.112996 -0.10622 0.08931 -0.083734 0.05424 0.08815 mu_log_b_tc 0.7149 -0.11300 1.000000 0.61358 0.14356 0.007630 0.17782 -0.17027 sigma_log_b_tc 0.3777 -0.10622 0.613583 1.00000 -0.05297 0.032583 0.03358 -0.24736 mu_log_b_hw 0.2303 0.08931 0.143556 -0.05297 1.00000 -0.251593 0.19951 -0.04791 sigma_log_b_hw 0.1089 -0.08373 0.007630 0.03258 -0.25159 1.000000 0.20147 -0.16222 mu_log_b_ch 0.3353 0.05424 0.177819 0.03358 0.19951 0.201471 1.00000 -0.16726 sigma_log_b_ch -0.2400 0.08815 -0.170265 -0.24736 -0.04791 -0.162219 -0.16726 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 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch mu_log_b_tt 1.00000 -0.41391 0.8603 0.55937 0.33222 0.06939 0.50271 -0.26760 sigma_log_b_tt -0.41391 1.00000 -0.3476 -0.36774 0.02054 -0.16201 -0.07559 0.21503 mu_log_b_tc 0.86027 -0.34764 1.0000 0.67654 0.22529 7.1600e-04 0.35150 -0.22174 sigma_log_b_tc 0.55937 -0.36774 0.6765 1.00000 -0.03609 0.17775 0.25702 -0.47943 mu_log_b_hw 0.33222 0.02054 0.2253 -0.03609 1.00000 -0.23964 0.37985 0.03668 sigma_log_b_hw 0.06939 -0.16201 7.1600e-04 0.17775 -0.23964 1.00000 0.21627 -0.36916 mu_log_b_ch 0.50271 -0.07559 0.3515 0.25702 0.37985 0.21627 1.00000 -0.29755 sigma_log_b_ch -0.26760 0.21503 -0.2217 -0.47943 0.03668 -0.36916 -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.2586206 23205 0.2735466 22580 0.2758595 21623 0.2957468 76862 0.3263382 16489 0.3392730 12534 0.3496089 21922 0.3514269 16184 0.3664991 15056 0.3673345 22820 0.3789472 20100 0.3805182 16617 0.3831291 24627 0.3840706 22961 0.3856301 15312 0.3861517 14754 0.3929183 17187 0.4030155 17645 0.4065215 Changes in parameter estimates from starting values: Initial Estimate Difference mu_log_b_tt -3.00000 -1.9962 1.00382 sigma_log_b_tt 0.01000 0.4801 0.47006 mu_log_b_tc -3.00000 -1.0298 1.97020 sigma_log_b_tc 0.01000 -0.9499 -0.95989 mu_log_b_hw -3.00000 -2.9450 0.05499 sigma_log_b_hw 0.01000 0.8180 0.80803 mu_log_b_ch -3.00000 0.6271 3.62707 sigma_log_b_ch 0.01000 -0.8480 -0.85802 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.9961771 sigma_log_b_tt 0.4800611 mu_log_b_tc 1.0298013 sigma_log_b_tc 0.9498856 mu_log_b_hw 2.9450136 sigma_log_b_hw 0.8180319 mu_log_b_ch 0.6270698 sigma_log_b_ch 0.8480171 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) }