Model run by stephane.hess using Apollo 0.2.9 on R 4.0.5 for Darwin. www.ApolloChoiceModelling.com Model name : MNL_SP_WTP_space Model description : MNL model on mode choice SP data, in WTP space Model run at : 2023-05-10 19:49:26 Estimation method : bfgs Model diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definitive maximum eigenvalue : -0.816596 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:4.72 pre-estimation : 00:00:0.84 estimation : 00:00:2.23 initial estimation : 00:00:2.15 estimation after rescaling : 00:00:0.07 post-estimation : 00:00:1.65 Iterations : 45 initial estimation : 44 estimation after rescaling : 1 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.06255 0.538550 0.1161 0.533038 0.1174 asc_air 0.23840 0.340126 0.7009 0.329273 0.7240 asc_rail -1.48126 0.327324 -4.5254 0.309843 -4.7807 wtp_tt_car 0.19746 0.010970 18.0003 0.011068 17.8404 wtp_tt_bus 0.29561 0.024965 11.8408 0.025315 11.6773 wtp_tt_air 0.33161 0.042852 7.7386 0.041592 7.9730 wtp_tt_rail 0.10834 0.028565 3.7927 0.027289 3.9701 wtp_access 0.39475 0.045270 8.7198 0.044973 8.7773 b_cost -0.05876 0.001487 -39.5170 0.001660 -35.3941 wtp_no_frills 0.00000 NA NA NA NA wtp_wifi -15.95675 0.897551 -17.7781 0.989352 -16.1285 wtp_food -6.97025 0.881673 -7.9057 0.889299 -7.8379 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 wtp_tt_air wtp_tt_rail wtp_access asc_bus 0.290037 0.033490 0.027794 -0.001543 0.012243 5.1090e-04 -2.8821e-04 9.6918e-04 asc_air 0.033490 0.115686 0.049672 -0.002523 -0.001047 0.010205 -4.4534e-04 0.008399 asc_rail 0.027794 0.049672 0.107141 -0.002473 -9.2080e-04 2.9853e-04 0.007186 4.0577e-04 wtp_tt_car -0.001543 -0.002523 -0.002473 1.2034e-04 3.621e-05 -4.983e-05 -3.838e-05 -1.970e-05 wtp_tt_bus 0.012243 -0.001047 -9.2080e-04 3.621e-05 6.2327e-04 -4.556e-05 -4.663e-05 -3.649e-05 wtp_tt_air 5.1090e-04 0.010205 2.9853e-04 -4.983e-05 -4.556e-05 0.001836 -1.2815e-04 5.9457e-04 wtp_tt_rail -2.8821e-04 -4.4534e-04 0.007186 -3.838e-05 -4.663e-05 -1.2815e-04 8.1594e-04 -2.2359e-04 wtp_access 9.6918e-04 0.008399 4.0577e-04 -1.970e-05 -3.649e-05 5.9457e-04 -2.2359e-04 0.002049 b_cost 2.030e-05 -8.222e-05 -3.463e-05 3.230e-06 6.821e-06 -2.889e-06 -4.814e-06 4.118e-06 wtp_wifi 6.1370e-04 0.061756 0.035229 -0.001513 -0.001736 0.001634 -8.9153e-04 -2.1019e-04 wtp_food 0.001278 0.034252 0.029389 -6.6041e-04 -6.0853e-04 -1.5136e-04 -3.5743e-04 -5.0195e-04 b_cost wtp_wifi wtp_food asc_bus 2.030e-05 6.1370e-04 0.001278 asc_air -8.222e-05 0.061756 0.034252 asc_rail -3.463e-05 0.035229 0.029389 wtp_tt_car 3.230e-06 -0.001513 -6.6041e-04 wtp_tt_bus 6.821e-06 -0.001736 -6.0853e-04 wtp_tt_air -2.889e-06 0.001634 -1.5136e-04 wtp_tt_rail -4.814e-06 -8.9153e-04 -3.5743e-04 wtp_access 4.118e-06 -2.1019e-04 -5.0195e-04 b_cost 2.211e-06 -2.8639e-04 -8.323e-05 wtp_wifi -2.8639e-04 0.805599 0.426525 wtp_food -8.323e-05 0.426525 0.777348 Robust covariance matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus wtp_tt_air wtp_tt_rail wtp_access asc_bus 0.284130 0.025231 0.020214 -0.001353 0.012139 8.0846e-04 -7.2245e-04 -9.6058e-04 asc_air 0.025231 0.108420 0.043448 -0.002318 -0.001137 0.008903 -0.001016 0.008490 asc_rail 0.020214 0.043448 0.096003 -0.002195 -9.1287e-04 -4.3901e-04 0.006083 7.8188e-04 wtp_tt_car -0.001353 -0.002318 -0.002195 1.2251e-04 4.927e-05 -8.338e-06 -2.374e-06 -3.323e-05 wtp_tt_bus 0.012139 -0.001137 -9.1287e-04 4.927e-05 6.4085e-04 1.959e-05 -2.245e-05 -1.2567e-04 wtp_tt_air 8.0846e-04 0.008903 -4.3901e-04 -8.338e-06 1.959e-05 0.001730 -1.2606e-04 4.9489e-04 wtp_tt_rail -7.2245e-04 -0.001016 0.006083 -2.374e-06 -2.245e-05 -1.2606e-04 7.4466e-04 -2.1977e-04 wtp_access -9.6058e-04 0.008490 7.8188e-04 -3.323e-05 -1.2567e-04 4.9489e-04 -2.1977e-04 0.002023 b_cost 4.526e-05 -8.456e-07 2.026e-05 3.029e-06 8.894e-06 3.818e-06 -2.545e-06 8.934e-06 wtp_wifi 0.035241 0.031691 0.016254 -0.002125 -0.001304 -0.003961 -0.002961 -7.3812e-04 wtp_food -0.016188 0.019646 0.026599 -0.001041 -0.001841 -0.003854 -9.9414e-04 -0.001540 b_cost wtp_wifi wtp_food asc_bus 4.526e-05 0.035241 -0.016188 asc_air -8.456e-07 0.031691 0.019646 asc_rail 2.026e-05 0.016254 0.026599 wtp_tt_car 3.029e-06 -0.002125 -0.001041 wtp_tt_bus 8.894e-06 -0.001304 -0.001841 wtp_tt_air 3.818e-06 -0.003961 -0.003854 wtp_tt_rail -2.545e-06 -0.002961 -9.9414e-04 wtp_access 8.934e-06 -7.3812e-04 -0.001540 b_cost 2.756e-06 -5.5226e-04 -1.1524e-04 wtp_wifi -5.5226e-04 0.978817 0.468937 wtp_food -1.1524e-04 0.468937 0.790852 Classical correlation matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus wtp_tt_air wtp_tt_rail wtp_access asc_bus 1.000000 0.18283 0.15767 -0.26118 0.91058 0.022138 -0.01874 0.039753 asc_air 0.182832 1.00000 0.44617 -0.67618 -0.12336 0.700198 -0.04584 0.545447 asc_rail 0.157671 0.44617 1.00000 -0.68872 -0.11268 0.021284 0.76860 0.027383 wtp_tt_car -0.261183 -0.67618 -0.68872 1.00000 0.13221 -0.106001 -0.12248 -0.039664 wtp_tt_bus 0.910580 -0.12336 -0.11268 0.13221 1.00000 -0.042591 -0.06539 -0.032283 wtp_tt_air 0.022138 0.70020 0.02128 -0.10600 -0.04259 1.000000 -0.10470 0.306495 wtp_tt_rail -0.018735 -0.04584 0.76860 -0.12248 -0.06539 -0.104698 1.00000 -0.172910 wtp_access 0.039753 0.54545 0.02738 -0.03966 -0.03228 0.306495 -0.17291 1.000000 b_cost 0.025354 -0.16258 -0.07116 0.19802 0.18377 -0.045347 -0.11336 0.061174 wtp_wifi 0.001270 0.20229 0.11991 -0.15365 -0.07748 0.042490 -0.03477 -0.005173 wtp_food 0.002691 0.11422 0.10184 -0.06828 -0.02765 -0.004006 -0.01419 -0.012576 b_cost wtp_wifi wtp_food asc_bus 0.02535 0.001270 0.002691 asc_air -0.16258 0.202293 0.114218 asc_rail -0.07116 0.119913 0.101836 wtp_tt_car 0.19802 -0.153650 -0.068281 wtp_tt_bus 0.18377 -0.077477 -0.027646 wtp_tt_air -0.04535 0.042490 -0.004006 wtp_tt_rail -0.11336 -0.034773 -0.014192 wtp_access 0.06117 -0.005173 -0.012576 b_cost 1.00000 -0.214604 -0.063492 wtp_wifi -0.21460 1.000000 0.538985 wtp_food -0.06349 0.538985 1.000000 Robust correlation matrix: asc_bus asc_air asc_rail wtp_tt_car wtp_tt_bus wtp_tt_air wtp_tt_rail wtp_access asc_bus 1.00000 0.143756 0.12239 -0.229351 0.89956 0.03647 -0.049667 -0.04007 asc_air 0.14376 1.000000 0.42586 -0.636042 -0.13643 0.65007 -0.113045 0.57335 asc_rail 0.12239 0.425862 1.00000 -0.640020 -0.11638 -0.03407 0.719492 0.05611 wtp_tt_car -0.22935 -0.636042 -0.64002 1.000000 0.17586 -0.01811 -0.007860 -0.06675 wtp_tt_bus 0.89956 -0.136430 -0.11638 0.175856 1.00000 0.01860 -0.032497 -0.11038 wtp_tt_air 0.03647 0.650070 -0.03407 -0.018111 0.01860 1.00000 -0.111066 0.26457 wtp_tt_rail -0.04967 -0.113045 0.71949 -0.007860 -0.03250 -0.11107 1.000000 -0.17907 wtp_access -0.04007 0.573350 0.05611 -0.066750 -0.11038 0.26457 -0.179074 1.00000 b_cost 0.05115 -0.001547 0.03940 0.164833 0.21164 0.05529 -0.056175 0.11966 wtp_wifi 0.06683 0.097280 0.05302 -0.194039 -0.05206 -0.09627 -0.109688 -0.01659 wtp_food -0.03415 0.067091 0.09653 -0.105710 -0.08176 -0.10418 -0.040965 -0.03850 b_cost wtp_wifi wtp_food asc_bus 0.051152 0.06683 -0.03415 asc_air -0.001547 0.09728 0.06709 asc_rail 0.039398 0.05302 0.09653 wtp_tt_car 0.164833 -0.19404 -0.10571 wtp_tt_bus 0.211637 -0.05206 -0.08176 wtp_tt_air 0.055295 -0.09627 -0.10418 wtp_tt_rail -0.056175 -0.10969 -0.04097 wtp_access 0.119664 -0.01659 -0.03850 b_cost 1.000000 -0.33626 -0.07806 wtp_wifi -0.336262 1.00000 0.53299 wtp_food -0.078059 0.53299 1.00000 20 worst outliers in terms of lowest average per choice prediction: ID Avg prob per choice 464 0.1815910 272 0.2158469 457 0.2243978 82 0.2251292 151 0.2385032 263 0.2422000 186 0.2425663 196 0.2428459 278 0.2514769 77 0.2541727 147 0.2563677 146 0.2608290 276 0.2617141 293 0.2647156 25 0.2674981 400 0.2683094 369 0.2688800 309 0.2704964 304 0.2708657 446 0.2711929 Changes in parameter estimates from starting values: Initial Estimate Difference asc_car 0.000 0.00000 0.00000 asc_bus 0.000 0.06255 0.06255 asc_air 0.000 0.23840 0.23840 asc_rail 0.000 -1.48126 -1.48126 wtp_tt_car 0.000 0.19746 0.19746 wtp_tt_bus 0.000 0.29561 0.29561 wtp_tt_air 0.000 0.33161 0.33161 wtp_tt_rail 0.000 0.10834 0.10834 wtp_access 0.000 0.39475 0.39475 b_cost 0.000 -0.05876 -0.05876 wtp_no_frills 0.000 0.00000 0.00000 wtp_wifi 0.000 -15.95675 -15.95675 wtp_food 0.000 -6.97025 -6.97025 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" panelData "TRUE" analyticGrad "TRUE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical jacobian of LL analytical gradient Scaling in estimation --------------------- Value asc_bus 0.06255229 asc_air 0.23840168 asc_rail 1.48126054 wtp_tt_car 0.19746395 wtp_tt_bus 0.29561104 wtp_tt_air 0.33161374 wtp_tt_rail 0.10833705 wtp_access 0.39474789 b_cost 0.05875530 wtp_wifi 15.95674820 wtp_food 6.97024545 Scaling used in computing Hessian --------------------------------- Value asc_bus 0.06255229 asc_air 0.23840165 asc_rail 1.48125899 wtp_tt_car 0.19746418 wtp_tt_bus 0.29561057 wtp_tt_air 0.33161397 wtp_tt_rail 0.10833697 wtp_access 0.39474794 b_cost 0.05875543 wtp_wifi 15.95674723 wtp_food 6.97024697 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) }