Model run by stephane.hess using Apollo 0.2.9 on R 4.0.5 for Darwin. www.ApolloChoiceModelling.com Model name : RRM Model description : Simple RRM model on mode choice SP data Model run at : 2023-05-10 21:59:58 Estimation method : bfgs Model diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definitive maximum eigenvalue : -15.188952 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) : -5737.51 Rho-squared vs equal shares : 0.3 Adj.Rho-squared vs equal shares : 0.2986 Rho-squared vs observed shares : 0.1445 Adj.Rho-squared vs observed shares : 0.1433 AIC : 11497.03 BIC : 11572.42 Estimated parameters : 11 Time taken (hh:mm:ss) : 00:00:16.73 pre-estimation : 00:00:6.56 estimation : 00:00:5.02 initial estimation : 00:00:4.4 estimation after rescaling : 00:00:0.62 post-estimation : 00:00:5.16 Iterations : 26 initial estimation : 25 estimation after rescaling : 1 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 -1.217618 0.215511 -5.650 0.344367 -3.536 asc_air 0.891722 0.188031 4.742 0.267086 3.339 asc_rail 0.777505 0.144307 5.388 0.199211 3.903 b_tt_car -0.004508 2.5522e-04 -17.662 2.8536e-04 -15.797 b_tt_bus -0.005473 3.5380e-04 -15.469 5.2327e-04 -10.459 b_tt_air -0.010534 0.001346 -7.828 0.001590 -6.626 b_tt_rail -0.009138 6.0384e-04 -15.133 6.6343e-04 -13.774 b_access -0.008612 0.001155 -7.456 0.001366 -6.304 b_cost -0.027574 6.9580e-04 -39.630 8.6723e-04 -31.796 b_no_frills 0.000000 NA NA NA NA b_wifi 0.553119 0.033377 16.572 0.035096 15.760 b_food 0.218281 0.030366 7.188 0.030485 7.160 mu_rrm 1.000000 NA NA NA NA Overview of choices for RRM model component RRM: 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 b_tt_car b_tt_bus b_tt_air b_tt_rail b_access asc_bus 0.04644 0.01688 0.01316 8.729e-06 -5.771e-05 -5.854e-05 -2.624e-05 -3.057e-05 asc_air 0.01688 0.03536 0.01240 1.109e-05 -1.248e-05 -1.4977e-04 -5.022e-06 -1.1217e-04 asc_rail 0.01316 0.01240 0.02082 1.326e-05 -7.628e-06 -5.102e-06 -4.642e-05 -2.308e-05 b_tt_car 8.729e-06 1.109e-05 1.326e-05 6.514e-08 4.215e-08 1.354e-07 8.148e-08 3.485e-08 b_tt_bus -5.771e-05 -1.248e-05 -7.628e-06 4.215e-08 1.252e-07 2.094e-07 1.128e-07 3.112e-08 b_tt_air -5.854e-05 -1.4977e-04 -5.102e-06 1.354e-07 2.094e-07 1.811e-06 2.789e-07 1.319e-07 b_tt_rail -2.624e-05 -5.022e-06 -4.642e-05 8.148e-08 1.128e-07 2.789e-07 3.646e-07 3.318e-08 b_access -3.057e-05 -1.1217e-04 -2.308e-05 3.485e-08 3.112e-08 1.319e-07 3.318e-08 1.334e-06 b_cost 7.486e-07 -3.583e-05 -1.513e-05 5.625e-08 5.443e-08 2.470e-07 1.356e-07 9.828e-08 b_wifi -2.2993e-04 -3.2093e-04 -1.8156e-04 -1.332e-06 -9.334e-07 -4.945e-06 -4.804e-06 -3.600e-06 b_food -1.5662e-04 -3.1865e-04 -3.0235e-04 -4.989e-07 -2.652e-07 -2.950e-06 -2.593e-06 -2.359e-06 b_cost b_wifi b_food asc_bus 7.486e-07 -2.2993e-04 -1.5662e-04 asc_air -3.583e-05 -3.2093e-04 -3.1865e-04 asc_rail -1.513e-05 -1.8156e-04 -3.0235e-04 b_tt_car 5.625e-08 -1.332e-06 -4.989e-07 b_tt_bus 5.443e-08 -9.334e-07 -2.652e-07 b_tt_air 2.470e-07 -4.945e-06 -2.950e-06 b_tt_rail 1.356e-07 -4.804e-06 -2.593e-06 b_access 9.828e-08 -3.600e-06 -2.359e-06 b_cost 4.841e-07 -5.937e-06 -2.952e-06 b_wifi -5.937e-06 0.001114 5.4078e-04 b_food -2.952e-06 5.4078e-04 9.2210e-04 Robust covariance matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access asc_bus 0.11859 0.021625 0.026027 1.321e-05 -1.5383e-04 -1.0837e-04 -7.200e-05 4.903e-05 asc_air 0.02163 0.071335 0.024974 2.334e-05 -9.994e-06 -2.7332e-04 -4.868e-06 -2.4478e-04 asc_rail 0.02603 0.024974 0.039685 2.882e-05 -1.398e-05 -9.887e-06 -7.433e-05 -4.393e-05 b_tt_car 1.321e-05 2.334e-05 2.882e-05 8.143e-08 5.236e-08 1.556e-07 6.757e-08 -2.488e-08 b_tt_bus -1.5383e-04 -9.994e-06 -1.398e-05 5.236e-08 2.738e-07 3.172e-07 1.773e-07 -1.337e-07 b_tt_air -1.0837e-04 -2.7332e-04 -9.887e-06 1.556e-07 3.172e-07 2.528e-06 2.864e-07 5.470e-07 b_tt_rail -7.200e-05 -4.868e-06 -7.433e-05 6.757e-08 1.773e-07 2.864e-07 4.401e-07 -9.288e-08 b_access 4.903e-05 -2.4478e-04 -4.393e-05 -2.488e-08 -1.337e-07 5.470e-07 -9.288e-08 1.866e-06 b_cost 3.386e-05 -5.321e-05 -2.355e-06 6.185e-08 8.509e-09 3.896e-07 7.119e-08 2.796e-07 b_wifi -5.5362e-04 -0.001083 -0.001130 -2.359e-06 -1.578e-06 -6.617e-06 -3.879e-06 1.300e-06 b_food -2.6066e-04 -6.5392e-04 -6.6351e-04 -1.196e-06 -6.984e-07 -5.325e-06 -2.791e-06 -8.197e-07 b_cost b_wifi b_food asc_bus 3.386e-05 -5.5362e-04 -2.6066e-04 asc_air -5.321e-05 -0.001083 -6.5392e-04 asc_rail -2.355e-06 -0.001130 -6.6351e-04 b_tt_car 6.185e-08 -2.359e-06 -1.196e-06 b_tt_bus 8.509e-09 -1.578e-06 -6.984e-07 b_tt_air 3.896e-07 -6.617e-06 -5.325e-06 b_tt_rail 7.119e-08 -3.879e-06 -2.791e-06 b_access 2.796e-07 1.300e-06 -8.197e-07 b_cost 7.521e-07 -2.513e-06 -2.650e-06 b_wifi -2.513e-06 0.001232 5.7882e-04 b_food -2.650e-06 5.7882e-04 9.2936e-04 Classical correlation matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access asc_bus 1.000000 0.41657 0.42307 0.15870 -0.75685 -0.20185 -0.20166 -0.12279 asc_air 0.416574 1.00000 0.45704 0.23110 -0.18759 -0.59188 -0.04423 -0.51650 asc_rail 0.423066 0.45704 1.00000 0.36015 -0.14940 -0.02627 -0.53272 -0.13845 b_tt_car 0.158705 0.23110 0.36015 1.00000 0.46676 0.39408 0.52873 0.11823 b_tt_bus -0.756848 -0.18759 -0.14940 0.46676 1.00000 0.43968 0.52783 0.07616 b_tt_air -0.201854 -0.59188 -0.02627 0.39408 0.43968 1.00000 0.34324 0.08487 b_tt_rail -0.201656 -0.04423 -0.53272 0.52873 0.52783 0.34324 1.00000 0.04758 b_access -0.122793 -0.51650 -0.13845 0.11823 0.07616 0.08487 0.04758 1.00000 b_cost 0.004992 -0.27384 -0.15073 0.31674 0.22110 0.26383 0.32280 0.12229 b_wifi -0.031965 -0.05114 -0.03770 -0.15641 -0.07904 -0.11009 -0.23837 -0.09337 b_food -0.023933 -0.05581 -0.06900 -0.06437 -0.02469 -0.07219 -0.14142 -0.06725 b_cost b_wifi b_food asc_bus 0.004992 -0.03197 -0.02393 asc_air -0.273844 -0.05114 -0.05581 asc_rail -0.150726 -0.03770 -0.06900 b_tt_car 0.316745 -0.15641 -0.06437 b_tt_bus 0.221100 -0.07904 -0.02469 b_tt_air 0.263828 -0.11009 -0.07219 b_tt_rail 0.322805 -0.23837 -0.14142 b_access 0.122288 -0.09337 -0.06725 b_cost 1.000000 -0.25563 -0.13972 b_wifi -0.255631 1.00000 0.53356 b_food -0.139725 0.53356 1.00000 Robust correlation matrix: asc_bus asc_air asc_rail b_tt_car b_tt_bus b_tt_air b_tt_rail b_access asc_bus 1.00000 0.23512 0.37940 0.13445 -0.85366 -0.19794 -0.31515 0.10421 asc_air 0.23512 1.00000 0.46939 0.30618 -0.07151 -0.64368 -0.02747 -0.67085 asc_rail 0.37940 0.46939 1.00000 0.50702 -0.13409 -0.03122 -0.56239 -0.16141 b_tt_car 0.13445 0.30618 0.50702 1.00000 0.35064 0.34303 0.35692 -0.06381 b_tt_bus -0.85366 -0.07151 -0.13409 0.35064 1.00000 0.38134 0.51072 -0.18697 b_tt_air -0.19794 -0.64368 -0.03122 0.34303 0.38134 1.00000 0.27149 0.25185 b_tt_rail -0.31515 -0.02747 -0.56239 0.35692 0.51072 0.27149 1.00000 -0.10247 b_access 0.10421 -0.67085 -0.16141 -0.06381 -0.18697 0.25185 -0.10247 1.00000 b_cost 0.11337 -0.22972 -0.01363 0.24993 0.01875 0.28256 0.12373 0.23603 b_wifi -0.04581 -0.11557 -0.16164 -0.23557 -0.08592 -0.11859 -0.16658 0.02711 b_food -0.02483 -0.08031 -0.10926 -0.13753 -0.04378 -0.10988 -0.13799 -0.01968 b_cost b_wifi b_food asc_bus 0.11337 -0.04581 -0.02483 asc_air -0.22972 -0.11557 -0.08031 asc_rail -0.01363 -0.16164 -0.10926 b_tt_car 0.24993 -0.23557 -0.13753 b_tt_bus 0.01875 -0.08592 -0.04378 b_tt_air 0.28256 -0.11859 -0.10988 b_tt_rail 0.12373 -0.16658 -0.13799 b_access 0.23603 0.02711 -0.01968 b_cost 1.00000 -0.08257 -0.10023 b_wifi -0.08257 1.00000 0.54100 b_food -0.10023 0.54100 1.00000 20 worst outliers in terms of lowest average per choice prediction: ID Avg prob per choice 464 0.1817113 82 0.1943996 272 0.2073515 77 0.2242663 151 0.2290605 196 0.2303523 117 0.2307214 446 0.2372410 263 0.2417279 309 0.2431901 74 0.2489797 409 0.2528825 369 0.2530326 475 0.2532406 186 0.2550092 25 0.2554575 447 0.2559116 493 0.2578996 276 0.2587382 304 0.2627907 Changes in parameter estimates from starting values: Initial Estimate Difference asc_car 0.000 0.000000 0.000000 asc_bus 0.000 -1.217618 -1.217618 asc_air 0.000 0.891722 0.891722 asc_rail 0.000 0.777505 0.777505 b_tt_car 0.000 -0.004508 -0.004508 b_tt_bus 0.000 -0.005473 -0.005473 b_tt_air 0.000 -0.010534 -0.010534 b_tt_rail 0.000 -0.009138 -0.009138 b_access 0.000 -0.008612 -0.008612 b_cost 0.000 -0.027574 -0.027574 b_no_frills 0.000 0.000000 0.000000 b_wifi 0.000 0.553119 0.553119 b_food 0.000 0.218281 0.218281 mu_rrm 1.000 1.000000 0.000000 Settings and functions used in model definition: apollo_control -------------- Value modelName "RRM" modelDescr "Simple RRM model on mode choice SP data" 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 1.217614321 asc_air 0.891714932 asc_rail 0.777507814 b_tt_car 0.004507671 b_tt_bus 0.005472876 b_tt_air 0.010534388 b_tt_rail 0.009138050 b_access 0.008612405 b_cost 0.027574988 b_wifi 0.553118346 b_food 0.218280850 Scaling used in computing Hessian --------------------------------- Value asc_bus 1.217617847 asc_air 0.891721521 asc_rail 0.777504688 b_tt_car 0.004507682 b_tt_bus 0.005472943 b_tt_air 0.010534310 b_tt_rail 0.009138091 b_access 0.008612362 b_cost 0.027574464 b_wifi 0.553119054 b_food 0.218281013 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() rrm_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, rum_inputs = list(car = asc_car, bus = asc_bus, air = asc_air, rail = asc_rail), regret_inputs = list( time=list(x=list(time_car, time_bus, time_air, time_rail), b=list(b_tt_car,b_tt_bus,b_tt_air,b_tt_rail)), cost=list(x=list(cost_car, cost_bus, cost_air, cost_rail), b=list(b_cost)), access=list(x=list(0, access_bus, access_air, access_rail), b=list(b_access)), frills=list(x=list(0, 0, b_no_frills * ( service_air == 1 ) + b_wifi * ( service_air == 2 ) + b_food * ( service_air == 3 ), b_no_frills * ( service_rail == 1 ) + b_wifi * ( service_rail == 2 ) + b_food * ( service_rail == 3 )), b=1)), #### need to put scale into a list too now regret_scale = list(mu_rrm) ) ### Compute probabilities using RRM model P[["model"]] = apollo_rrm(rrm_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) }