Model run by stephane.hess using Apollo 0.3.5 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 : normal_density Model description : Normal density function fitted to attitudinal question in drug choice data Model run at : 2025-03-10 17:14:48.839272 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -56.633614 reciprocal of condition number : 0.121244 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) : -2738.46 LL at equal shares, LL(0) : NA LL at observed shares, LL(C) : NA LL(final) : -2146.11 Rho-squared vs equal shares : Not applicable Adj.Rho-squared vs equal shares : Not applicable Rho-squared vs observed shares : Not applicable Adj.Rho-squared vs observed shares : Not applicable AIC : 4300.22 BIC : 4319.85 Estimated parameters : 4 Time taken (hh:mm:ss) : 00:00:0.16 pre-estimation : 00:00:0.07 estimation : 00:00:0.04 post-estimation : 00:00:0.06 Iterations : 9 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) beta_reg_user 1.240 0.12074 10.27 0.09538 13.00 beta_university 1.421 0.11623 12.23 0.08876 16.01 beta_age_50 1.963 0.11680 16.81 0.08757 22.42 sigma 2.069 0.04627 44.72 0.04065 50.91 Summary statistics for NORMD model component : Min. 1st Qu. Median Mean 3rd Qu. Max. 1 2 3 2.741 3 5 Classical covariance matrix: beta_reg_user beta_university beta_age_50 sigma beta_reg_user 0.014578 -0.003545 -0.003344 -1.111e-09 beta_university -0.003545 0.013509 -0.004011 3.125e-09 beta_age_50 -0.003344 -0.004011 0.013643 -2.003e-08 sigma -1.111e-09 3.125e-09 -2.003e-08 0.002141 Robust covariance matrix: beta_reg_user beta_university beta_age_50 sigma beta_reg_user 0.009098 -0.002209 -0.001586 1.9361e-04 beta_university -0.002209 0.007879 -0.002228 1.5340e-04 beta_age_50 -0.001586 -0.002228 0.007668 -1.9252e-04 sigma 1.9361e-04 1.5340e-04 -1.9252e-04 0.001652 Classical correlation matrix: beta_reg_user beta_university beta_age_50 sigma beta_reg_user 1.0000 -0.2526 -0.2371 -1.989e-07 beta_university -0.2526 1.0000 -0.2955 5.811e-07 beta_age_50 -0.2371 -0.2955 1.0000 -3.705e-06 sigma -1.989e-07 5.811e-07 -3.705e-06 1.000 Robust correlation matrix: beta_reg_user beta_university beta_age_50 sigma beta_reg_user 1.00000 -0.26090 -0.18986 0.04994 beta_university -0.26090 1.00000 -0.28665 0.04252 beta_age_50 -0.18986 -0.28665 1.00000 -0.05409 sigma 0.04994 0.04252 -0.05409 1.00000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 40 0.6334637 90 0.6334637 92 0.6334637 103 0.6334637 116 0.6334637 164 0.6334637 239 0.6334637 267 0.6334637 281 0.6334637 297 0.6334637 440 0.6334637 477 0.6334637 522 0.6334637 555 0.6334637 580 0.6334637 663 0.6334637 676 0.6334637 704 0.6334637 717 0.6334637 729 0.6334637 Changes in parameter estimates from starting values: Initial Estimate Difference beta_reg_user 0.000 1.240 1.23976 beta_university 0.000 1.421 1.42095 beta_age_50 0.000 1.963 1.96321 sigma 2.000 2.069 0.06922 Settings and functions used in model definition: apollo_control -------------- Value modelDescr "Normal density function fitted to attitudinal question in drug choice data" indivID "ID" outputDirectory "output/" debug "FALSE" modelName "normal_density" 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 beta_reg_user 1.239756 beta_university 1.420950 beta_age_50 1.963212 sigma 2.069222 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 Normal Density normalDensity_settings = list(outcomeNormal = attitude_quality, xNormal = beta_reg_user*regular_user + beta_university*university_educated + beta_age_50*over_50, mu = 0, sigma = sigma, rows = (task==1)) P[["model"]] = apollo_normalDensity(normalDensity_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) }