Model run by stephane.hess using Apollo 0.2.9 on R 4.0.5 for Darwin. www.ApolloChoiceModelling.com Model name : OL Model description : Ordered logit model fitted to attitudinal question in drug choice data Model run at : 2023-05-10 22:03:49 Estimation method : bfgs Model diagnosis : successful convergence Optimisation diagnosis : Maximum found hessian properties : Negative definitive maximum eigenvalue : -19.866512 Number of individuals : 1000 Number of rows in database : 10000 Number of modelled outcomes : 1000 Number of cores used : 1 Model without mixing LL(start) : -1523.56 LL at equal shares, LL(0) : -1609.44 LL at observed shares, LL(C) : -1482.03 LL(final) : -1452.86 Rho-squared vs equal shares : 0.0973 Adj.Rho-squared vs equal shares : 0.0929 Rho-squared vs observed shares : 0.0197 Adj.Rho-squared vs observed shares : 0.0177 AIC : 2919.72 BIC : 2954.08 Estimated parameters : 7 Time taken (hh:mm:ss) : 00:00:1.15 pre-estimation : 00:00:0.34 estimation : 00:00:0.27 initial estimation : 00:00:0.22 estimation after rescaling : 00:00:0.05 post-estimation : 00:00:0.53 Iterations : 17 initial estimation : 16 estimation after rescaling : 1 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) beta_reg_user -0.6812 0.1215 -5.606 0.1203 -5.662 beta_university -0.4776 0.1182 -4.042 0.1185 -4.032 beta_age_50 0.3731 0.1183 3.153 0.1185 3.149 tau_quality_1 -1.6098 0.1158 -13.905 0.1146 -14.043 tau_quality_2 -0.8387 0.1063 -7.889 0.1030 -8.145 tau_quality_3 0.9730 0.1074 9.061 0.1046 9.301 tau_quality_4 1.9779 0.1296 15.258 0.1274 15.528 Overview of choices for model component : 1 2 3 4 5 Times chosen 220 151.0 398.0 130 101.0 Percentage chosen overall 22 15.1 39.8 13 10.1 Classical covariance matrix: beta_reg_user beta_university beta_age_50 tau_quality_1 tau_quality_2 beta_reg_user 0.014763 6.1563e-04 5.3551e-04 0.006627 0.006143 beta_university 6.1563e-04 0.013962 6.370e-06 0.006451 0.006051 beta_age_50 5.3551e-04 6.370e-06 0.014004 0.005096 0.005362 tau_quality_1 0.006627 0.006451 0.005096 0.013402 0.010608 tau_quality_2 0.006143 0.006051 0.005362 0.010608 0.011301 tau_quality_3 0.004797 0.005052 0.006108 0.007945 0.008203 tau_quality_4 0.004464 0.004865 0.006349 0.007553 0.007763 tau_quality_3 tau_quality_4 beta_reg_user 0.004797 0.004464 beta_university 0.005052 0.004865 beta_age_50 0.006108 0.006349 tau_quality_1 0.007945 0.007553 tau_quality_2 0.008203 0.007763 tau_quality_3 0.011531 0.010543 tau_quality_4 0.010543 0.016805 Robust covariance matrix: beta_reg_user beta_university beta_age_50 tau_quality_1 tau_quality_2 beta_reg_user 0.014473 -3.9163e-04 3.6878e-04 0.006147 0.005703 beta_university -3.9163e-04 0.014035 -7.2730e-04 0.006158 0.005444 beta_age_50 3.6878e-04 -7.2730e-04 0.014044 0.004597 0.004821 tau_quality_1 0.006147 0.006158 0.004597 0.013141 0.010110 tau_quality_2 0.005703 0.005444 0.004821 0.010110 0.010603 tau_quality_3 0.004416 0.004136 0.005877 0.007409 0.007531 tau_quality_4 0.003710 0.004011 0.006201 0.006916 0.007011 tau_quality_3 tau_quality_4 beta_reg_user 0.004416 0.003710 beta_university 0.004136 0.004011 beta_age_50 0.005877 0.006201 tau_quality_1 0.007409 0.006916 tau_quality_2 0.007531 0.007011 tau_quality_3 0.010944 0.009932 tau_quality_4 0.009932 0.016225 Classical correlation matrix: beta_reg_user beta_university beta_age_50 tau_quality_1 tau_quality_2 beta_reg_user 1.00000 0.04288 0.03724 0.4711 0.4756 beta_university 0.04288 1.00000 4.5558e-04 0.4716 0.4817 beta_age_50 0.03724 4.5558e-04 1.00000 0.3720 0.4263 tau_quality_1 0.47114 0.47161 0.37199 1.0000 0.8619 tau_quality_2 0.47561 0.48169 0.42626 0.8619 1.0000 tau_quality_3 0.36767 0.39819 0.48063 0.6391 0.7186 tau_quality_4 0.28338 0.31760 0.41387 0.5033 0.5633 tau_quality_3 tau_quality_4 beta_reg_user 0.3677 0.2834 beta_university 0.3982 0.3176 beta_age_50 0.4806 0.4139 tau_quality_1 0.6391 0.5033 tau_quality_2 0.7186 0.5633 tau_quality_3 1.0000 0.7574 tau_quality_4 0.7574 1.0000 Robust correlation matrix: beta_reg_user beta_university beta_age_50 tau_quality_1 tau_quality_2 beta_reg_user 1.00000 -0.02748 0.02587 0.4457 0.4603 beta_university -0.02748 1.00000 -0.05180 0.4534 0.4462 beta_age_50 0.02587 -0.05180 1.00000 0.3384 0.3951 tau_quality_1 0.44572 0.45345 0.33843 1.0000 0.8565 tau_quality_2 0.46034 0.44624 0.39508 0.8565 1.0000 tau_quality_3 0.35092 0.33373 0.47410 0.6178 0.6992 tau_quality_4 0.24208 0.26581 0.41083 0.4736 0.5345 tau_quality_3 tau_quality_4 beta_reg_user 0.3509 0.2421 beta_university 0.3337 0.2658 beta_age_50 0.4741 0.4108 tau_quality_1 0.6178 0.4736 tau_quality_2 0.6992 0.5345 tau_quality_3 1.0000 0.7453 tau_quality_4 0.7453 1.0000 20 worst outliers in terms of lowest average per choice prediction: ID Avg prob per choice 748 0.7276569 541 0.7539148 643 0.7539148 766 0.7539148 4 0.7601614 388 0.7601614 534 0.7601614 669 0.7601614 738 0.7601614 923 0.7601614 78 0.7613385 91 0.7613385 126 0.7613385 127 0.7613385 245 0.7613385 253 0.7613385 392 0.7613385 415 0.7613385 445 0.7613385 448 0.7613385 Changes in parameter estimates from starting values: Initial Estimate Difference beta_reg_user 0.000 -0.6812 -0.68116 beta_university 0.000 -0.4776 -0.47765 beta_age_50 0.000 0.3731 0.37315 tau_quality_1 -2.000 -1.6098 0.39022 tau_quality_2 -1.000 -0.8387 0.16131 tau_quality_3 1.000 0.9730 -0.02698 tau_quality_4 2.000 1.9779 -0.02206 Settings and functions used in model definition: apollo_control -------------- Value modelName "OL" modelDescr "Ordered logit model fitted to attitudinal question in drug choice 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 beta_reg_user 0.6811571 beta_university 0.4776465 beta_age_50 0.3731465 tau_quality_1 1.6097890 tau_quality_2 0.8386936 tau_quality_3 0.9730169 tau_quality_4 1.9779483 Scaling used in computing Hessian --------------------------------- Value beta_reg_user 0.6811579 beta_university 0.4776467 beta_age_50 0.3731464 tau_quality_1 1.6097792 tau_quality_2 0.8386946 tau_quality_3 0.9730176 tau_quality_4 1.9779449 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() ### Calculate probabilities using Ordered Logit model ol_settings = list(outcomeOrdered = attitude_quality, utility = beta_reg_user*regular_user + beta_university*university_educated + beta_age_50*over_50, tau = list(tau_quality_1, tau_quality_2, tau_quality_3, tau_quality_4), rows = (task==1)) P[["model"]] = apollo_ol(ol_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) }