Model run by stephane.hess using Apollo 0.2.9 on R 4.0.5 for Darwin. www.ApolloChoiceModelling.com Model name : DFT_route_choice Model description : DFT model on Swiss route choice SP data Model run at : 2023-05-10 22:02:17 Estimation method : bfgs Model diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definitive maximum eigenvalue : -0.260898 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 4 Model without mixing LL(start) : -2334.29 LL at equal shares, LL(0) : -2420.47 LL at observed shares, LL(C) : NA LL(final) : -1620.96 Rho-squared vs equal shares : 0.3303 Adj.Rho-squared vs equal shares : 0.3278 Rho-squared vs observed shares : Not applicable Adj.Rho-squared vs observed shares : Not applicable AIC : 3253.92 BIC : 3290.87 Estimated parameters : 6 Time taken (hh:mm:ss) : 00:00:52.08 pre-estimation : 00:00:7.23 estimation : 00:00:33.24 initial estimation : 00:00:30.07 estimation after rescaling : 00:00:3.17 post-estimation : 00:00:11.61 Iterations : 29 initial estimation : 26 estimation after rescaling : 3 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_1 0.3864 1.95773 0.1974 2.07970 0.1858 asc_2 0.0000 NA NA NA NA b_tc 0.8968 0.05453 16.4472 0.09469 9.4711 b_tt 0.0000 NA NA NA NA b_hw -0.6710 0.08637 -7.7692 0.11341 -5.9165 b_ch 2.6245 0.07859 33.3941 0.10270 25.5545 p_phi1 0.0000 NA NA NA NA p_phi2 0.0000 NA NA NA NA p_error_sd 6.2633 0.71645 8.7422 0.88508 7.0766 p_timesteps 3.5444 0.12772 27.7517 0.15235 23.2648 Overview of choices for DFT 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: asc_1 b_tc b_hw b_ch p_error_sd p_timesteps asc_1 3.832707 -9.2236e-04 0.001642 7.6720e-04 -0.026211 -0.002661 b_tc -9.2236e-04 0.002973 -5.2004e-04 -8.9813e-04 -0.010713 -9.0936e-04 b_hw 0.001642 -5.2004e-04 0.007460 0.005019 0.009317 -4.0548e-04 b_ch 7.6720e-04 -8.9813e-04 0.005019 0.006176 0.018423 0.001572 p_error_sd -0.026211 -0.010713 0.009317 0.018423 0.513302 0.078352 p_timesteps -0.002661 -9.0936e-04 -4.0548e-04 0.001572 0.078352 0.016312 Robust covariance matrix: asc_1 b_tc b_hw b_ch p_error_sd p_timesteps asc_1 4.325173 0.008491 -0.004225 -0.011539 -0.05737 0.007413 b_tc 0.008491 0.008966 -0.001927 -0.002430 -0.03181 -0.002342 b_hw -0.004225 -0.001927 0.012863 0.008789 0.02844 7.3582e-04 b_ch -0.011539 -0.002430 0.008789 0.010547 0.03721 0.004044 p_error_sd -0.057370 -0.031806 0.028441 0.037207 0.78337 0.107566 p_timesteps 0.007413 -0.002342 7.3582e-04 0.004044 0.10757 0.023211 Classical correlation matrix: asc_1 b_tc b_hw b_ch p_error_sd p_timesteps asc_1 1.000000 -0.008640 0.009712 0.004986 -0.01869 -0.01064 b_tc -0.008640 1.000000 -0.110426 -0.209586 -0.27423 -0.13058 b_hw 0.009712 -0.110426 1.000000 0.739434 0.15056 -0.03676 b_ch 0.004986 -0.209586 0.739434 1.000000 0.32719 0.15664 p_error_sd -0.018687 -0.274228 0.150561 0.327187 1.00000 0.85626 p_timesteps -0.010643 -0.130578 -0.036759 0.156642 0.85626 1.00000 Robust correlation matrix: asc_1 b_tc b_hw b_ch p_error_sd p_timesteps asc_1 1.00000 0.04312 -0.01791 -0.05402 -0.03117 0.02339 b_tc 0.04312 1.00000 -0.17942 -0.24985 -0.37951 -0.16235 b_hw -0.01791 -0.17942 1.00000 0.75454 0.28333 0.04258 b_ch -0.05402 -0.24985 0.75454 1.00000 0.40933 0.25845 p_error_sd -0.03117 -0.37951 0.28333 0.40933 1.00000 0.79771 p_timesteps 0.02339 -0.16235 0.04258 0.25845 0.79771 1.00000 20 worst outliers in terms of lowest average per choice prediction: ID Avg prob per choice 13214 0.2207886 23205 0.2446301 19470 0.2941417 22278 0.2945761 20323 0.3004176 22580 0.3193576 14802 0.3200023 76862 0.3213022 18219 0.3263700 20010 0.3447890 15174 0.3488902 14728 0.3551089 16489 0.3668112 80546 0.3690925 20063 0.3708068 15030 0.3762868 18272 0.3811423 22186 0.3812413 14951 0.3835906 22961 0.3839412 Changes in parameter estimates from starting values: Initial Estimate Difference asc_1 0.000 0.3864 0.3864 asc_2 0.000 0.0000 0.0000 b_tc 0.000 0.8968 0.8968 b_tt 0.000 0.0000 0.0000 b_hw 0.000 -0.6710 -0.6710 b_ch 0.000 2.6245 2.6245 p_phi1 0.000 0.0000 0.0000 p_phi2 0.000 0.0000 0.0000 p_error_sd 1.000 6.2633 5.2633 p_timesteps 1.000 3.5444 2.5444 Settings and functions used in model definition: apollo_control -------------- Value modelName "DFT_route_choice" modelDescr "DFT model on Swiss route choice SP data" indivID "ID" nCores "4" outputDirectory "output/" debug "FALSE" 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 second derivative of LL (using numDeriv) Scaling in estimation --------------------- Value asc_1 0.3864242 b_tc 0.8968122 b_hw 0.6710180 b_ch 2.6244509 p_error_sd 6.2633606 p_timesteps 3.5444400 Scaling used in computing Hessian --------------------------------- Value asc_1 0.3864242 b_tc 0.8968122 b_hw 0.6710181 b_ch 2.6244539 p_error_sd 6.2633411 p_timesteps 3.5444318 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 attribute values attrValues = list() attrValues[["alt1"]] = list(time=-tt1, cost=-tc1, headway = -hw1, changes=-ch1) attrValues[["alt2"]] = list(time=-tt2, cost=-tc2, headway = -hw2, changes=-ch2) ### List of initial preference values altStart = list() altStart[["alt1"]] = asc_1 altStart[["alt2"]] = asc_2 ### List of attribute weights attrWeights = list(time = exp(b_tt)/(exp(b_tt)+exp(b_tc)+exp(b_hw)+exp(b_ch)), cost = exp(b_tc)/(exp(b_tt)+exp(b_tc)+exp(b_hw)+exp(b_ch)), headway = exp(b_hw)/(exp(b_tt)+exp(b_tc)+exp(b_hw)+exp(b_ch)), changes = exp(b_ch)/(exp(b_tt)+exp(b_tc)+exp(b_hw)+exp(b_ch))) ### List of process parameters procPars = list( error_sd = p_error_sd, timesteps = 1+exp(p_timesteps), phi1 = p_phi1, phi2 = p_phi2 ) ### Define settings for DFT model component dft_settings = list( alternatives = c(alt1=1, alt2=2), avail = list(alt1=1,alt2=1), choiceVar = choice, attrValues = attrValues, altStart = altStart, attrWeights = attrWeights, attrScalings = 1, ### Using weights, so attrScalings must be set to 1. procPars = procPars ) ### Compute choice probabilities using DFT model P[["model"]] = apollo_dft(dft_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) }