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 : 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-03-10 17:39:19.275627 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -28.366207 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:32.67 pre-estimation : 00:00:7.8 estimation : 00:00:6.55 post-estimation : 00:00:18.32 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.12815 -15.157 sigma_log_b_tt 0.4787 0.07990 5.991 0.08256 5.798 mu_log_b_tc -0.9887 0.15269 -6.475 0.21695 -4.557 sigma_log_b_tc -0.9725 0.10691 -9.096 0.12705 -7.654 mu_log_b_hw -2.8977 0.08645 -33.520 0.09162 -31.628 sigma_log_b_hw 0.8103 0.13314 6.086 0.17477 4.636 mu_log_b_ch 0.6731 0.07621 8.833 0.08403 8.011 sigma_log_b_ch -0.8240 0.11737 -7.021 0.14945 -5.514 sigma_hsk 0.5532 0.12846 4.307 0.15710 3.522 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 sigma_hsk mu_log_b_tt 0.008784 -0.002328 0.010323 0.003256 0.002253 0.001341 0.002635 -0.001434 0.002989 sigma_log_b_tt -0.002328 0.006384 -0.002221 -2.8703e-04 5.8135e-04 -0.001732 2.7661e-04 6.9110e-04 4.6455e-04 mu_log_b_tc 0.010323 -0.002221 0.023316 0.009727 0.002280 6.5200e-04 0.002307 -0.001928 0.002875 sigma_log_b_tc 0.003256 -2.8703e-04 0.009727 0.011430 -5.2819e-04 2.3411e-04 -5.3967e-04 4.7876e-04 -6.8945e-04 mu_log_b_hw 0.002253 5.8135e-04 0.002280 -5.2819e-04 0.007473 -0.003008 0.001732 -9.0918e-04 0.002746 sigma_log_b_hw 0.001341 -0.001732 6.5200e-04 2.3411e-04 -0.003008 0.017725 0.001273 0.002509 -4.5415e-04 mu_log_b_ch 0.002635 2.7661e-04 0.002307 -5.3967e-04 0.001732 0.001273 0.005807 -6.6933e-04 0.002854 sigma_log_b_ch -0.001434 6.9110e-04 -0.001928 4.7876e-04 -9.0918e-04 0.002509 -6.6933e-04 0.013775 -1.6018e-04 sigma_hsk 0.002989 4.6455e-04 0.002875 -6.8945e-04 0.002746 -4.5415e-04 0.002854 -1.6018e-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 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 0.016423 -0.004462 0.024016 0.008551 0.004467 0.001859 0.005590 -0.001971 0.004463 sigma_log_b_tt -0.004462 0.006817 -0.007893 -0.002385 -4.064e-05 -0.003972 -6.8002e-04 0.001323 -3.0153e-04 mu_log_b_tc 0.024016 -0.007893 0.047065 0.018626 0.005211 0.001947 0.006648 -0.004227 0.004105 sigma_log_b_tc 0.008551 -0.002385 0.018626 0.016141 -1.5272e-04 0.002634 0.001013 8.7293e-04 -9.7174e-04 mu_log_b_hw 0.004467 -4.064e-05 0.005211 -1.5272e-04 0.008394 -0.004031 0.003431 -0.001054 0.002443 sigma_log_b_hw 0.001859 -0.003972 0.001947 0.002634 -0.004031 0.030544 0.001151 0.007553 8.6277e-04 mu_log_b_ch 0.005590 -6.8002e-04 0.006648 0.001013 0.003431 0.001151 0.007061 -0.001368 0.003263 sigma_log_b_ch -0.001971 0.001323 -0.004227 8.7293e-04 -0.001054 0.007553 -0.001368 0.022335 -7.1891e-04 sigma_hsk 0.004463 -3.0153e-04 0.004105 -9.7174e-04 0.002443 8.6277e-04 0.003263 -7.1891e-04 0.024681 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 sigma_hsk mu_log_b_tt 1.0000 -0.31089 0.72133 0.32501 0.27813 0.10747 0.36896 -0.13035 0.24828 sigma_log_b_tt -0.3109 1.00000 -0.18208 -0.03360 0.08417 -0.16279 0.04543 0.07370 0.04526 mu_log_b_tc 0.7213 -0.18208 1.00000 0.59588 0.17271 0.03207 0.19824 -0.10759 0.14657 sigma_log_b_tc 0.3250 -0.03360 0.59588 1.00000 -0.05715 0.01645 -0.06624 0.03815 -0.05020 mu_log_b_hw 0.2781 0.08417 0.17271 -0.05715 1.00000 -0.26136 0.26287 -0.08961 0.24726 sigma_log_b_hw 0.1075 -0.16279 0.03207 0.01645 -0.26136 1.00000 0.12547 0.16058 -0.02655 mu_log_b_ch 0.3690 0.04543 0.19824 -0.06624 0.26287 0.12547 1.00000 -0.07483 0.29150 sigma_log_b_ch -0.1303 0.07370 -0.10759 0.03815 -0.08961 0.16058 -0.07483 1.00000 -0.01062 sigma_hsk 0.2483 0.04526 0.14657 -0.05020 0.24726 -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 sigma_log_b_hw mu_log_b_ch sigma_log_b_ch sigma_hsk mu_log_b_tt 1.00000 -0.421684 0.86381 0.52517 0.380470 0.08301 0.51909 -0.10293 0.22170 sigma_log_b_tt -0.42168 1.000000 -0.44065 -0.22740 -0.005373 -0.27526 -0.09801 0.10724 -0.02325 mu_log_b_tc 0.86381 -0.440651 1.00000 0.67577 0.262150 0.05135 0.36469 -0.13039 0.12045 sigma_log_b_tc 0.52517 -0.227399 0.67577 1.00000 -0.013120 0.11862 0.09486 0.04597 -0.04869 mu_log_b_hw 0.38047 -0.005373 0.26215 -0.01312 1.000000 -0.25173 0.44559 -0.07700 0.16975 sigma_log_b_hw 0.08301 -0.275259 0.05135 0.11862 -0.251732 1.00000 0.07835 0.28919 0.03142 mu_log_b_ch 0.51909 -0.098015 0.36469 0.09486 0.445594 0.07835 1.00000 -0.10894 0.24720 sigma_log_b_ch -0.10293 0.107245 -0.13039 0.04597 -0.077005 0.28919 -0.10894 1.00000 -0.03062 sigma_hsk 0.22170 -0.023247 0.12045 -0.04869 0.169751 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.2683260 21623 0.3107959 76862 0.3170869 16489 0.3236569 23205 0.3335130 21922 0.3416020 12534 0.3430567 15056 0.3566816 22961 0.3710572 16617 0.3735840 24627 0.3763632 14754 0.3855796 16184 0.3861403 22820 0.3883781 17187 0.3983074 82613 0.4093975 15312 0.4181119 15489 0.4217363 Changes in parameter estimates from starting values: Initial Estimate Difference mu_log_b_tt -3.00000 -1.9425 1.0575 sigma_log_b_tt 0.01000 0.4787 0.4687 mu_log_b_tc -3.00000 -0.9887 2.0113 sigma_log_b_tc 0.01000 -0.9725 -0.9825 mu_log_b_hw -3.00000 -2.8977 0.1023 sigma_log_b_hw 0.01000 0.8103 0.8003 mu_log_b_ch -3.00000 0.6731 3.6731 sigma_log_b_ch 0.01000 -0.8240 -0.8340 sigma_hsk 0.01000 0.5532 0.5432 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.9424737 sigma_log_b_tt 0.4786881 mu_log_b_tc 0.9886568 sigma_log_b_tc 0.9724567 mu_log_b_hw 2.8977378 sigma_log_b_hw 0.8102615 mu_log_b_ch 0.6731263 sigma_log_b_ch 0.8240192 sigma_hsk 0.5532405 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) }