Model run by stephane.hess using Apollo 0.3.4 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_SP_WTP_space Model description : MNL model on mode choice SP data, in WTP space Model run at : 2024-09-27 15:18:08.955651 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -0.816606 reciprocal of condition number : 3.32466e-07 Number of individuals : 500 Number of rows in database : 7000 Number of modelled outcomes : 7000 Number of cores used : 1 Model without mixing LL(start) : -8196.02 LL at equal shares, LL(0) : -8196.02 LL at observed shares, LL(C) : -6706.94 LL(final) : -5598.9 Rho-squared vs equal shares : 0.3169 Adj.Rho-squared vs equal shares : 0.3155 Rho-squared vs observed shares : 0.1652 Adj.Rho-squared vs observed shares : 0.164 AIC : 11219.8 BIC : 11295.19 Estimated parameters : 11 Time taken (hh:mm:ss) : 00:00:1.07 pre-estimation : 00:00:0.19 estimation : 00:00:0.23 post-estimation : 00:00:0.65 Iterations : 11 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_car 0.00000 NA NA NA NA asc_bus 0.06241 0.538550 0.1159 0.533037 0.1171 asc_air 0.23828 0.340124 0.7006 0.329272 0.7236 asc_rail -1.48137 0.327325 -4.5257 0.309844 -4.7810 wtp_tt_car 0.19746 0.010970 18.0006 0.011068 17.8407 wtp_tt_bus 0.29560 0.024965 11.8408 0.025314 11.6774 wtp_tt_air 0.33160 0.042851 7.7383 0.041592 7.9727 wtp_tt_rail 0.10833 0.028564 3.7924 0.027288 3.9697 wtp_access 0.39473 0.045270 8.7195 0.044973 8.7770 b_cost -0.05876 0.001487 -39.5176 0.001660 -35.3946 wtp_no_frills 0.00000 NA NA NA NA wtp_wifi -15.95678 0.897545 -17.7782 0.989345 -16.1286 wtp_food -6.97052 0.881668 -7.9061 0.889295 -7.8383 Overview of choices for MNL model component : car bus air rail Times available 5446.00 6314.00 5264.00 6118.00 Times chosen 1946.00 358.00 1522.00 3174.00 Percentage chosen overall 27.80 5.11 21.74 45.34 Percentage chosen when available 35.73 5.67 28.91 51.88 Classical covariance matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus asc_bus 0.290036 0.033491 0.027795 -0.001543 0.012243 asc_air 0.033491 0.115685 0.049672 -0.002523 -0.001047 asc_rail 0.027795 0.049672 0.107142 -0.002473 -9.2076e-04 wtp_tt_car -0.001543 -0.002523 -0.002473 1.2034e-04 3.620e-05 wtp_tt_bus 0.012243 -0.001047 -9.2076e-04 3.620e-05 6.2325e-04 wtp_tt_air 5.1094e-04 0.010205 2.9851e-04 -4.983e-05 -4.556e-05 wtp_tt_rail -2.8817e-04 -4.4534e-04 0.007186 -3.838e-05 -4.663e-05 wtp_access 9.6917e-04 0.008399 4.0577e-04 -1.970e-05 -3.649e-05 b_cost 2.028e-05 -8.220e-05 -3.463e-05 3.229e-06 6.820e-06 wtp_wifi 6.1630e-04 0.061753 0.035229 -0.001513 -0.001736 wtp_food 0.001278 0.034251 0.029389 -6.6041e-04 -6.0850e-04 wtp_tt_air wtp_tt_rail wtp_access b_cost wtp_wifi asc_bus 5.1094e-04 -2.8817e-04 9.6917e-04 2.028e-05 6.1630e-04 asc_air 0.010205 -4.4534e-04 0.008399 -8.220e-05 0.061753 asc_rail 2.9851e-04 0.007186 4.0577e-04 -3.463e-05 0.035229 wtp_tt_car -4.983e-05 -3.838e-05 -1.970e-05 3.229e-06 -0.001513 wtp_tt_bus -4.556e-05 -4.663e-05 -3.649e-05 6.820e-06 -0.001736 wtp_tt_air 0.001836 -1.2815e-04 5.9457e-04 -2.888e-06 0.001634 wtp_tt_rail -1.2815e-04 8.1593e-04 -2.2359e-04 -4.815e-06 -8.9141e-04 wtp_access 5.9457e-04 -2.2359e-04 0.002049 4.118e-06 -2.1028e-04 b_cost -2.888e-06 -4.815e-06 4.118e-06 2.211e-06 -2.8638e-04 wtp_wifi 0.001634 -8.9141e-04 -2.1028e-04 -2.8638e-04 0.805587 wtp_food -1.5138e-04 -3.5736e-04 -5.0198e-04 -8.324e-05 0.426521 wtp_food asc_bus 0.001278 asc_air 0.034251 asc_rail 0.029389 wtp_tt_car -6.6041e-04 wtp_tt_bus -6.0850e-04 wtp_tt_air -1.5138e-04 wtp_tt_rail -3.5736e-04 wtp_access -5.0198e-04 b_cost -8.324e-05 wtp_wifi 0.426521 wtp_food 0.777339 Robust covariance matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus asc_bus 0.284129 0.025233 0.020214 -0.001353 0.012138 asc_air 0.025233 0.108420 0.043448 -0.002318 -0.001137 asc_rail 0.020214 0.043448 0.096003 -0.002195 -9.1285e-04 wtp_tt_car -0.001353 -0.002318 -0.002195 1.2250e-04 4.927e-05 wtp_tt_bus 0.012138 -0.001137 -9.1285e-04 4.927e-05 6.4081e-04 wtp_tt_air 8.0849e-04 0.008903 -4.3904e-04 -8.333e-06 1.960e-05 wtp_tt_rail -7.2242e-04 -0.001016 0.006083 -2.376e-06 -2.245e-05 wtp_access -9.6063e-04 0.008491 7.8189e-04 -3.323e-05 -1.2567e-04 b_cost 4.522e-05 -8.022e-07 2.027e-05 3.028e-06 8.890e-06 wtp_wifi 0.035251 0.031682 0.016253 -0.002125 -0.001303 wtp_food -0.016186 0.019644 0.026599 -0.001040 -0.001841 wtp_tt_air wtp_tt_rail wtp_access b_cost wtp_wifi asc_bus 8.0849e-04 -7.2242e-04 -9.6063e-04 4.522e-05 0.035251 asc_air 0.008903 -0.001016 0.008491 -8.022e-07 0.031682 asc_rail -4.3904e-04 0.006083 7.8189e-04 2.027e-05 0.016253 wtp_tt_car -8.333e-06 -2.376e-06 -3.323e-05 3.028e-06 -0.002125 wtp_tt_bus 1.960e-05 -2.245e-05 -1.2567e-04 8.890e-06 -0.001303 wtp_tt_air 0.001730 -1.2607e-04 4.9490e-04 3.821e-06 -0.003962 wtp_tt_rail -1.2607e-04 7.4466e-04 -2.1977e-04 -2.547e-06 -0.002961 wtp_access 4.9490e-04 -2.1977e-04 0.002023 8.936e-06 -7.3859e-04 b_cost 3.821e-06 -2.547e-06 8.936e-06 2.756e-06 -5.5224e-04 wtp_wifi -0.003962 -0.002961 -7.3859e-04 -5.5224e-04 0.978805 wtp_food -0.003854 -9.9402e-04 -0.001540 -1.1525e-04 0.468936 wtp_food asc_bus -0.016186 asc_air 0.019644 asc_rail 0.026599 wtp_tt_car -0.001040 wtp_tt_bus -0.001841 wtp_tt_air -0.003854 wtp_tt_rail -9.9402e-04 wtp_access -0.001540 b_cost -1.1525e-04 wtp_wifi 0.468936 wtp_food 0.790846 Classical correlation matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus asc_bus 1.000000 0.18284 0.15767 -0.26119 0.91058 asc_air 0.182838 1.00000 0.44617 -0.67618 -0.12335 asc_rail 0.157673 0.44617 1.00000 -0.68872 -0.11268 wtp_tt_car -0.261190 -0.67618 -0.68872 1.00000 0.13220 wtp_tt_bus 0.910581 -0.12335 -0.11268 0.13220 1.00000 wtp_tt_air 0.022140 0.70020 0.02128 -0.10600 -0.04259 wtp_tt_rail -0.018732 -0.04584 0.76860 -0.12248 -0.06539 wtp_access 0.039752 0.54545 0.02738 -0.03966 -0.03228 b_cost 0.025330 -0.16254 -0.07115 0.19800 0.18373 wtp_wifi 0.001275 0.20229 0.11991 -0.15365 -0.07747 wtp_food 0.002692 0.11422 0.10184 -0.06828 -0.02765 wtp_tt_air wtp_tt_rail wtp_access b_cost wtp_wifi asc_bus 0.022140 -0.01873 0.039752 0.02533 0.001275 asc_air 0.700199 -0.04584 0.545450 -0.16254 0.202286 asc_rail 0.021282 0.76860 0.027383 -0.07115 0.119912 wtp_tt_car -0.105997 -0.12248 -0.039664 0.19800 -0.153645 wtp_tt_bus -0.042586 -0.06539 -0.032284 0.18373 -0.077468 wtp_tt_air 1.000000 -0.10470 0.306496 -0.04533 0.042486 wtp_tt_rail -0.104699 1.00000 -0.172911 -0.11338 -0.034769 wtp_access 0.306496 -0.17291 1.000000 0.06118 -0.005175 b_cost -0.045326 -0.11338 0.061185 1.00000 -0.214597 wtp_wifi 0.042486 -0.03477 -0.005175 -0.21460 1.000000 wtp_food -0.004007 -0.01419 -0.012577 -0.06350 0.538988 wtp_food asc_bus 0.002692 asc_air 0.114218 asc_rail 0.101837 wtp_tt_car -0.068282 wtp_tt_bus -0.027646 wtp_tt_air -0.004007 wtp_tt_rail -0.014190 wtp_access -0.012577 b_cost -0.063500 wtp_wifi 0.538988 wtp_food 1.000000 Robust correlation matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus asc_bus 1.00000 0.143765 0.12239 -0.229366 0.89956 asc_air 0.14376 1.000000 0.42586 -0.636031 -0.13641 asc_rail 0.12239 0.425861 1.00000 -0.640023 -0.11638 wtp_tt_car -0.22937 -0.636031 -0.64002 1.000000 0.17584 wtp_tt_bus 0.89956 -0.136412 -0.11638 0.175836 1.00000 wtp_tt_air 0.03647 0.650072 -0.03407 -0.018102 0.01861 wtp_tt_rail -0.04967 -0.113049 0.71949 -0.007865 -0.03250 wtp_access -0.04007 0.573357 0.05611 -0.066748 -0.11039 b_cost 0.05110 -0.001468 0.03941 0.164790 0.21156 wtp_wifi 0.06684 0.097256 0.05302 -0.194028 -0.05203 wtp_food -0.03415 0.067086 0.09653 -0.105709 -0.08176 wtp_tt_air wtp_tt_rail wtp_access b_cost wtp_wifi asc_bus 0.03647 -0.049666 -0.04007 0.051103 0.06684 asc_air 0.65007 -0.113049 0.57336 -0.001468 0.09726 asc_rail -0.03407 0.719490 0.05611 0.039408 0.05302 wtp_tt_car -0.01810 -0.007865 -0.06675 0.164790 -0.19403 wtp_tt_bus 0.01861 -0.032501 -0.11039 0.211563 -0.05203 wtp_tt_air 1.00000 -0.111072 0.26457 0.055344 -0.09629 wtp_tt_rail -0.11107 1.000000 -0.17908 -0.056217 -0.10968 wtp_access 0.26457 -0.179078 1.00000 0.119700 -0.01660 b_cost 0.05534 -0.056217 0.11970 1.000000 -0.33625 wtp_wifi -0.09629 -0.109675 -0.01660 -0.336253 1.00000 wtp_food -0.10419 -0.040961 -0.03850 -0.078067 0.53299 wtp_food asc_bus -0.03415 asc_air 0.06709 asc_rail 0.09653 wtp_tt_car -0.10571 wtp_tt_bus -0.08176 wtp_tt_air -0.10419 wtp_tt_rail -0.04096 wtp_access -0.03850 b_cost -0.07807 wtp_wifi 0.53299 wtp_food 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 464 0.1815920 272 0.2158480 457 0.2243954 82 0.2251270 151 0.2385036 263 0.2422002 186 0.2425681 196 0.2428432 278 0.2514740 77 0.2541713 147 0.2563694 146 0.2608293 276 0.2617144 293 0.2647152 25 0.2674995 400 0.2683087 369 0.2688813 309 0.2704938 304 0.2708669 446 0.2711952 Changes in parameter estimates from starting values: Initial Estimate Difference asc_car 0.000 0.00000 0.00000 asc_bus 0.000 0.06241 0.06241 asc_air 0.000 0.23828 0.23828 asc_rail 0.000 -1.48137 -1.48137 wtp_tt_car 0.000 0.19746 0.19746 wtp_tt_bus 0.000 0.29560 0.29560 wtp_tt_air 0.000 0.33160 0.33160 wtp_tt_rail 0.000 0.10833 0.10833 wtp_access 0.000 0.39473 0.39473 b_cost 0.000 -0.05876 -0.05876 wtp_no_frills 0.000 0.00000 0.00000 wtp_wifi 0.000 -15.95678 -15.95678 wtp_food 0.000 -6.97052 -6.97052 Settings and functions used in model definition: apollo_control -------------- Value modelName "MNL_SP_WTP_space" modelDescr "MNL model on mode choice SP data, in WTP space" indivID "ID" outputDirectory "output/" debug "FALSE" 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.06240912 asc_air 0.23827639 asc_rail 1.48137010 wtp_tt_car 0.19746405 wtp_tt_bus 0.29560344 wtp_tt_air 0.33159830 wtp_tt_rail 0.10832827 wtp_access 0.39472896 b_cost 0.05875594 wtp_wifi 15.95677813 wtp_food 6.97052401 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_cost * ( wtp_tt_car * time_car + cost_car ) V[["bus"]] = asc_bus + b_cost * ( wtp_tt_bus * time_bus + wtp_access * access_bus + cost_bus ) V[["air"]] = asc_air + b_cost * ( wtp_tt_air * time_air + wtp_access * access_air + cost_air + wtp_no_frills * ( service_air == 1 ) + wtp_wifi * ( service_air == 2 ) + wtp_food * ( service_air == 3 ) ) V[["rail"]] = asc_rail + b_cost * ( wtp_tt_rail * time_rail + wtp_access * access_rail + cost_rail + wtp_no_frills * ( service_rail == 1 ) + wtp_wifi * ( service_rail == 2 ) + wtp_food * ( service_rail == 3 ) ) ### 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) }