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 : ECL_preference_space_heteroskedasticity Model description : Error components logit model on Swiss route choice data, uncorrelated Lognormals in preference space, with heteroskedasticity term Model run at : 2025-09-19 12:45:09.091204 Estimation method : bgw Estimation diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -28.366213 reciprocal of condition number : 0.0652005 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.77 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : -2420.39 LL(final) : -1442.11 Rho-squared vs equal shares : 0.4042 Adj.Rho-squared vs equal shares : 0.4005 Rho-squared vs observed shares : 0.4042 Adj.Rho-squared vs observed shares : 0.4009 AIC : 2902.22 BIC : 2957.64 Estimated parameters : 9 Time taken (hh:mm:ss) : 00:00:29.59 pre-estimation : 00:00:7.66 estimation : 00:00:6.25 post-estimation : 00:00:15.68 Iterations : 15 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) mu_log_b_tt -1.9425 0.09372 -20.726 0.12799 -15.177 sigma_log_b_tt 0.4787 0.07990 5.991 0.08246 5.805 mu_log_b_tc -0.9887 0.15269 -6.475 0.21667 -4.563 sigma_log_b_tc -0.9725 0.10691 -9.096 0.12689 -7.664 mu_log_b_hw -2.8977 0.08645 -33.520 0.09150 -31.669 sigma_log_b_hw 0.8103 0.13314 6.086 0.17455 4.642 mu_log_b_ch 0.6731 0.07621 8.833 0.08392 8.021 sigma_log_b_ch -0.8240 0.11737 -7.021 0.14926 -5.521 sigma_hsk 0.5532 0.12846 4.307 0.15690 3.526 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.008784 -0.002328 0.010323 0.003256 0.002253 sigma_log_b_tt -0.002328 0.006384 -0.002221 -2.8703e-04 5.8135e-04 mu_log_b_tc 0.010323 -0.002221 0.023316 0.009727 0.002280 sigma_log_b_tc 0.003256 -2.8703e-04 0.009727 0.011430 -5.2820e-04 mu_log_b_hw 0.002253 5.8135e-04 0.002280 -5.2820e-04 0.007473 sigma_log_b_hw 0.001341 -0.001732 6.5200e-04 2.3413e-04 -0.003008 mu_log_b_ch 0.002635 2.7661e-04 0.002307 -5.3967e-04 0.001732 sigma_log_b_ch -0.001434 6.9108e-04 -0.001928 4.7877e-04 -9.0920e-04 sigma_hsk 0.002989 4.6455e-04 0.002875 -6.8945e-04 0.002746 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 0.001341 0.002635 -0.001434 0.002989 sigma_log_b_tt -0.001732 2.7661e-04 6.9108e-04 4.6455e-04 mu_log_b_tc 6.5200e-04 0.002307 -0.001928 0.002875 sigma_log_b_tc 2.3413e-04 -5.3967e-04 4.7877e-04 -6.8945e-04 mu_log_b_hw -0.003008 0.001732 -9.0920e-04 0.002746 sigma_log_b_hw 0.017726 0.001273 0.002510 -4.5417e-04 mu_log_b_ch 0.001273 0.005807 -6.6933e-04 0.002854 sigma_log_b_ch 0.002510 -6.6933e-04 0.013776 -1.6019e-04 sigma_hsk -4.5417e-04 0.002854 -1.6019e-04 0.016503 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.016381 -0.004450 0.023954 0.008529 0.004456 sigma_log_b_tt -0.004450 0.006799 -0.007873 -0.002379 -4.053e-05 mu_log_b_tc 0.023954 -0.007873 0.046944 0.018578 0.005197 sigma_log_b_tc 0.008529 -0.002379 0.018578 0.016100 -1.5233e-04 mu_log_b_hw 0.004456 -4.053e-05 0.005197 -1.5233e-04 0.008372 sigma_log_b_hw 0.001854 -0.003962 0.001942 0.002627 -0.004020 mu_log_b_ch 0.005576 -6.7826e-04 0.006631 0.001010 0.003422 sigma_log_b_ch -0.001966 0.001320 -0.004217 8.7074e-04 -0.001052 sigma_hsk 0.004452 -3.0076e-04 0.004095 -9.6924e-04 0.002437 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 0.001854 0.005576 -0.001966 0.004452 sigma_log_b_tt -0.003962 -6.7826e-04 0.001320 -3.0076e-04 mu_log_b_tc 0.001942 0.006631 -0.004217 0.004095 sigma_log_b_tc 0.002627 0.001010 8.7074e-04 -9.6924e-04 mu_log_b_hw -0.004020 0.003422 -0.001052 0.002437 sigma_log_b_hw 0.030466 0.001148 0.007535 8.6052e-04 mu_log_b_ch 0.001148 0.007043 -0.001365 0.003255 sigma_log_b_ch 0.007535 -0.001365 0.022278 -7.1708e-04 sigma_hsk 8.6052e-04 0.003255 -7.1708e-04 0.024617 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.31089 0.72133 0.32501 0.27813 sigma_log_b_tt -0.3109 1.00000 -0.18208 -0.03360 0.08417 mu_log_b_tc 0.7213 -0.18208 1.00000 0.59588 0.17271 sigma_log_b_tc 0.3250 -0.03360 0.59588 1.00000 -0.05715 mu_log_b_hw 0.2781 0.08417 0.17271 -0.05715 1.00000 sigma_log_b_hw 0.1075 -0.16279 0.03207 0.01645 -0.26136 mu_log_b_ch 0.3690 0.04543 0.19824 -0.06624 0.26287 sigma_log_b_ch -0.1303 0.07370 -0.10759 0.03815 -0.08961 sigma_hsk 0.2483 0.04526 0.14657 -0.05020 0.24726 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 0.10747 0.36896 -0.13035 0.24828 sigma_log_b_tt -0.16279 0.04543 0.07370 0.04526 mu_log_b_tc 0.03207 0.19824 -0.10759 0.14657 sigma_log_b_tc 0.01645 -0.06624 0.03815 -0.05020 mu_log_b_hw -0.26136 0.26287 -0.08961 0.24726 sigma_log_b_hw 1.00000 0.12547 0.16059 -0.02655 mu_log_b_ch 0.12547 1.00000 -0.07483 0.29150 sigma_log_b_ch 0.16059 -0.07483 1.00000 -0.01062 sigma_hsk -0.02655 0.29150 -0.01062 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.421684 0.86381 0.52516 0.380470 sigma_log_b_tt -0.42168 1.000000 -0.44065 -0.22740 -0.005372 mu_log_b_tc 0.86381 -0.440651 1.00000 0.67577 0.262150 sigma_log_b_tc 0.52516 -0.227398 0.67577 1.00000 -0.013121 mu_log_b_hw 0.38047 -0.005372 0.26215 -0.01312 1.000000 sigma_log_b_hw 0.08301 -0.275259 0.05135 0.11862 -0.251735 mu_log_b_ch 0.51909 -0.098014 0.36469 0.09486 0.445594 sigma_log_b_ch -0.10293 0.107238 -0.13039 0.04598 -0.077010 sigma_hsk 0.22170 -0.023247 0.12045 -0.04869 0.169751 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 0.08301 0.51909 -0.10293 0.22170 sigma_log_b_tt -0.27526 -0.09801 0.10724 -0.02325 mu_log_b_tc 0.05135 0.36469 -0.13039 0.12045 sigma_log_b_tc 0.11862 0.09486 0.04598 -0.04869 mu_log_b_hw -0.25173 0.44559 -0.07701 0.16975 sigma_log_b_hw 1.00000 0.07834 0.28921 0.03142 mu_log_b_ch 0.07834 1.00000 -0.10894 0.24720 sigma_log_b_ch 0.28921 -0.10894 1.00000 -0.03062 sigma_hsk 0.03142 0.24720 -0.03062 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 16178 0.2453577 22580 0.2680900 15174 0.2683261 21623 0.3107960 76862 0.3170869 16489 0.3236569 23205 0.3335131 21922 0.3416019 12534 0.3430567 15056 0.3566817 22961 0.3710573 16617 0.3735839 24627 0.3763632 14754 0.3855796 16184 0.3861404 22820 0.3883781 17187 0.3983074 82613 0.4093974 15312 0.4181120 15489 0.4217363 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Error components logit model on Swiss route choice data, uncorrelated Lognormals in preference space, with heteroskedasticity term" indivID "ID" nCores "4" outputDirectory "output/" mixing "TRUE" debug "FALSE" modelName "ECL_preference_space_heteroskedasticity" 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.9424738 sigma_log_b_tt 0.4786880 mu_log_b_tc 0.9886571 sigma_log_b_tc 0.9724568 mu_log_b_hw 2.8977379 sigma_log_b_hw 0.8102620 mu_log_b_ch 0.6731263 sigma_log_b_ch 0.8240191 sigma_hsk 0.5532407 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 ) randcoeff[["hsk"]] = sigma_hsk * draws_hsk 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 + hsk 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) }