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 : MNL_RP Model description : Simple MNL model on mode choice RP data Model run at : 2025-03-10 17:00:07.228632 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -0.79691 reciprocal of condition number : 3.93679e-08 Number of individuals : 500 Number of rows in database : 1000 Number of modelled outcomes : 1000 Number of cores used : 1 Model without mixing LL(start) : -1170.86 LL at equal shares, LL(0) : -1170.86 LL at observed shares, LL(C) : -1085.14 LL(final) : -1025.76 Rho-squared vs equal shares : 0.1239 Adj.Rho-squared vs equal shares : 0.1162 Rho-squared vs observed shares : 0.0547 Adj.Rho-squared vs observed shares : 0.0492 AIC : 2069.51 BIC : 2113.68 Estimated parameters : 9 Time taken (hh:mm:ss) : 00:00:0.23 pre-estimation : 00:00:0.09 estimation : 00:00:0.03 post-estimation : 00:00:0.11 Iterations : 8 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_car 0.000000 NA NA NA NA asc_bus 0.474676 1.018672 0.4660 0.990600 0.4792 asc_air 1.629072 0.827435 1.9688 0.817513 1.9927 asc_rail 0.944534 0.803551 1.1755 0.795160 1.1879 b_tt_car -0.003646 0.001555 -2.3455 0.001568 -2.3251 b_tt_bus -0.008846 0.002624 -3.3711 0.002616 -3.3815 b_tt_air -0.020685 0.006599 -3.1346 0.006424 -3.2202 b_tt_rail -0.011239 0.004386 -2.5626 0.004468 -2.5157 b_access -0.011466 0.006430 -1.7832 0.006297 -1.8210 b_cost -0.033947 0.003295 -10.3035 0.003180 -10.6755 Overview of choices for MNL model component : car bus air rail Times available 778.00 902.00 752.00 874.00 Times chosen 332.00 126.00 215.00 327.00 Percentage chosen overall 33.20 12.60 21.50 32.70 Percentage chosen when available 42.67 13.97 28.59 37.41 Classical covariance matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access b_cost asc_bus 1.037693 0.202767 0.172024 5.6464e-04 -0.002324 -7.511e-05 8.596e-05 -4.1818e-04 -1.623e-05 asc_air 0.202767 0.684649 0.263731 7.4623e-04 1.6769e-04 -0.004045 1.6027e-04 -0.003063 -5.9668e-04 asc_rail 0.172024 0.263731 0.645694 7.6548e-04 1.7276e-04 -1.7624e-04 -0.002788 -8.856e-05 -2.4112e-04 b_tt_car 5.6464e-04 7.4623e-04 7.6548e-04 2.416e-06 5.258e-07 -4.517e-07 -2.301e-07 -9.328e-08 9.375e-07 b_tt_bus -0.002324 1.6769e-04 1.7276e-04 5.258e-07 6.886e-06 -4.708e-07 -1.662e-07 -3.529e-07 1.241e-06 b_tt_air -7.511e-05 -0.004045 -1.7624e-04 -4.517e-07 -4.708e-07 4.355e-05 -1.739e-06 1.462e-05 5.352e-06 b_tt_rail 8.596e-05 1.6027e-04 -0.002788 -2.301e-07 -1.662e-07 -1.739e-06 1.924e-05 -4.075e-06 2.344e-06 b_access -4.1818e-04 -0.003063 -8.856e-05 -9.328e-08 -3.529e-07 1.462e-05 -4.075e-06 4.134e-05 2.828e-06 b_cost -1.623e-05 -5.9668e-04 -2.4112e-04 9.375e-07 1.241e-06 5.352e-06 2.344e-06 2.828e-06 1.086e-05 Robust covariance matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access b_cost asc_bus 0.981289 0.194391 0.119591 4.8954e-04 -0.002220 -2.7852e-04 3.0780e-04 -3.1143e-04 -4.001e-05 asc_air 0.194391 0.668328 0.246693 7.5673e-04 2.1771e-04 -0.003775 3.0675e-04 -0.003090 -5.4452e-04 asc_rail 0.119591 0.246693 0.632280 7.0636e-04 2.9497e-04 4.547e-06 -0.002766 -4.4491e-04 -1.6803e-04 b_tt_car 4.8954e-04 7.5673e-04 7.0636e-04 2.459e-06 8.166e-07 -2.712e-07 3.139e-07 -5.372e-07 1.063e-06 b_tt_bus -0.002220 2.1771e-04 2.9497e-04 8.166e-07 6.844e-06 2.123e-07 -4.117e-07 -9.655e-07 1.277e-06 b_tt_air -2.7852e-04 -0.003775 4.547e-06 -2.712e-07 2.123e-07 4.126e-05 -2.525e-06 1.364e-05 4.559e-06 b_tt_rail 3.0780e-04 3.0675e-04 -0.002766 3.139e-07 -4.117e-07 -2.525e-06 1.996e-05 -2.321e-06 1.968e-06 b_access -3.1143e-04 -0.003090 -4.4491e-04 -5.372e-07 -9.655e-07 1.364e-05 -2.321e-06 3.965e-05 4.018e-06 b_cost -4.001e-05 -5.4452e-04 -1.6803e-04 1.063e-06 1.277e-06 4.559e-06 1.968e-06 4.018e-06 1.011e-05 Classical correlation matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access b_cost asc_bus 1.000000 0.24056 0.21016 0.356572 -0.86928 -0.01117 0.01924 -0.063845 -0.004835 asc_air 0.240564 1.00000 0.39666 0.580156 0.07723 -0.74086 0.04416 -0.575631 -0.218873 asc_rail 0.210156 0.39666 1.00000 0.612818 0.08193 -0.03324 -0.79114 -0.017140 -0.091075 b_tt_car 0.356572 0.58016 0.61282 1.000000 0.12891 -0.04404 -0.03375 -0.009332 0.183049 b_tt_bus -0.869282 0.07723 0.08193 0.128909 1.00000 -0.02719 -0.01444 -0.020915 0.143544 b_tt_air -0.011174 -0.74086 -0.03324 -0.044037 -0.02719 1.00000 -0.06008 0.344585 0.246159 b_tt_rail 0.019239 0.04416 -0.79114 -0.033754 -0.01444 -0.06008 1.00000 -0.144482 0.162236 b_access -0.063845 -0.57563 -0.01714 -0.009332 -0.02092 0.34458 -0.14448 1.000000 0.133489 b_cost -0.004835 -0.21887 -0.09107 0.183049 0.14354 0.24616 0.16224 0.133489 1.000000 Robust correlation matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access b_cost asc_bus 1.00000 0.24004 0.15183 0.31514 -0.85671 -0.04377 0.06955 -0.04993 -0.01270 asc_air 0.24004 1.00000 0.37950 0.59029 0.10180 -0.71883 0.08399 -0.60034 -0.20946 asc_rail 0.15183 0.37950 1.00000 0.56648 0.14180 8.9018e-04 -0.77869 -0.08886 -0.06645 b_tt_car 0.31514 0.59029 0.56648 1.00000 0.19905 -0.02692 0.04480 -0.05440 0.21320 b_tt_bus -0.85671 0.10180 0.14180 0.19905 1.00000 0.01264 -0.03522 -0.05861 0.15356 b_tt_air -0.04377 -0.71883 8.9018e-04 -0.02692 0.01264 1.00000 -0.08798 0.33722 0.22318 b_tt_rail 0.06955 0.08399 -0.77869 0.04480 -0.03522 -0.08798 1.00000 -0.08252 0.13854 b_access -0.04993 -0.60034 -0.08886 -0.05440 -0.05861 0.33722 -0.08252 1.00000 0.20068 b_cost -0.01270 -0.20946 -0.06645 0.21320 0.15356 0.22318 0.13854 0.20068 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 227 0.09402486 166 0.10679214 253 0.11808379 462 0.12224797 112 0.12893234 2 0.13175140 317 0.13889444 381 0.14516203 267 0.14935517 231 0.15478065 86 0.15515134 300 0.15877793 43 0.15898097 453 0.16107162 417 0.16181188 125 0.16343248 76 0.16384989 287 0.16583638 35 0.16655658 413 0.16790013 Changes in parameter estimates from starting values: Initial Estimate Difference asc_car 0.000 0.000000 0.000000 asc_bus 0.000 0.474676 0.474676 asc_air 0.000 1.629072 1.629072 asc_rail 0.000 0.944534 0.944534 b_tt_car 0.000 -0.003646 -0.003646 b_tt_bus 0.000 -0.008846 -0.008846 b_tt_air 0.000 -0.020685 -0.020685 b_tt_rail 0.000 -0.011239 -0.011239 b_access 0.000 -0.011466 -0.011466 b_cost 0.000 -0.033947 -0.033947 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Simple MNL model on mode choice RP data" indivID "ID" outputDirectory "output/" debug "FALSE" modelName "MNL_RP" nCores "1" workInLogs "FALSE" seed "13" mixing "FALSE" 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 asc_bus 0.474676373 asc_air 1.629072425 asc_rail 0.944534481 b_tt_car 0.003646076 b_tt_bus 0.008846170 b_tt_air 0.020684978 b_tt_rail 0.011239362 b_access 0.011465750 b_cost 0.033947177 apollo_probabilities ---------------------- function(apollo_beta, apollo_inputs, functionality="estimate"){ ### 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[["car"]] = asc_car + b_tt_car * time_car + b_cost * cost_car V[["bus"]] = asc_bus + b_tt_bus * time_bus + b_access * access_bus + b_cost * cost_bus V[["air"]] = asc_air + b_tt_air * time_air + b_access * access_air + b_cost * cost_air V[["rail"]] = asc_rail + b_tt_rail * time_rail + b_access * access_rail + b_cost * cost_rail ### Define settings for MNL model component mnl_settings = list( alternatives = c(car=1, bus=2, air=3, rail=4), avail = list(car=av_car, bus=av_bus, air=av_air, rail=av_rail), 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) ### Prepare and return outputs of function P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }