Model run by stephane.hess using Apollo 0.3.4 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 : MDCEV_with_outside_good Model description : MDCEV model on time use data, alpha-gamma profile with outside good and socio-demographics Model run at : 2024-09-27 16:46:08.455883 Estimation method : bgw Model diagnosis : Relative function convergence Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -2e-06 reciprocal of condition number : 1.54841e-09 Number of individuals : 447 Number of rows in database : 2826 Number of modelled outcomes : 2826 Number of cores used : 1 Model without mixing LL(start) : -21594.92 LL at equal shares, LL(0) : NA LL at observed shares, LL(C) : NA LL(final) : -15007.36 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 : 30044.72 BIC : 30133.92 Estimated parameters : 15 Time taken (hh:mm:ss) : 00:00:2.33 pre-estimation : 00:00:0.13 estimation : 00:00:0.98 post-estimation : 00:00:1.22 Iterations : 34 Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) alpha_base -19.1941 659.47611 -0.02911 0.12263 -156.516 gamma_work 4.8989 0.29745 16.46932 0.28121 17.421 gamma_school 3.0986 0.58593 5.28836 0.54815 5.653 gamma_shopping 0.4264 0.02697 15.81276 0.03088 13.808 gamma_private 0.6200 0.05038 12.30746 0.06763 9.168 gamma_leisure 2.0958 0.11402 18.38107 0.12634 16.589 delta_work -3.7172 0.07070 -52.57775 0.11544 -32.201 delta_school -7.4183 0.22459 -33.03008 0.34573 -21.457 delta_shopping -3.8044 0.04154 -91.58299 0.05212 -72.999 delta_private -4.2786 0.04785 -89.41655 0.06188 -69.148 delta_leisure -3.4001 0.04423 -76.87341 0.05645 -60.227 delta_work_FT 1.3248 0.08157 16.24190 0.13484 9.825 delta_work_wknd -2.8609 0.14288 -20.02289 0.19540 -14.641 delta_school_young 2.3442 0.25751 9.10328 0.40178 5.834 delta_leisure_wknd 0.2949 0.07139 4.13025 0.07397 3.987 sig 1.0000 NA NA NA NA Overview of choices for MDCEV model component : outside work school shopping private leisure Times available 2826.00 2826.00 2826.00 2826.0 2826.00 2826.00 Observations in which chosen 2826.00 1139.00 85.00 783.0 535.00 1174.00 Average consumption when available 18.21 2.89 0.11 0.5 0.44 1.85 Average consumption when chosen 18.21 7.17 3.52 1.8 2.34 4.45 Classical covariance matrix: alpha_base gamma_work gamma_school gamma_shopping gamma_private alpha_base 4.349e+05 -0.014850 -0.008217 -0.001351 -0.002202 gamma_work -0.014850 0.088479 -4.7926e-04 -3.032e-05 -5.857e-05 gamma_school -0.008217 -4.7926e-04 0.343309 -4.528e-06 -1.888e-05 gamma_shopping -0.001351 -3.032e-05 -4.528e-06 7.2722e-04 3.073e-07 gamma_private -0.002202 -5.857e-05 -1.888e-05 3.073e-07 0.002538 gamma_leisure -0.006823 -5.8253e-04 -1.7298e-04 -2.712e-06 -1.060e-05 delta_work 0.005650 -0.002152 1.2333e-04 4.550e-06 6.644e-06 delta_school 0.005515 -1.0683e-04 -2.2873e-04 2.068e-06 7.242e-07 delta_shopping 0.005597 -6.179e-05 3.825e-06 -1.6228e-04 -6.348e-07 delta_private 0.005615 -5.703e-05 1.861e-06 3.029e-07 -2.1534e-04 delta_leisure 0.005592 -4.347e-05 3.478e-05 -2.691e-06 -8.952e-07 delta_work_FT -1.7215e-04 -0.004915 -1.0583e-04 -6.964e-06 -7.118e-06 delta_work_wknd 2.0563e-04 0.006178 -7.760e-05 1.055e-05 6.501e-06 delta_school_young 5.853e-05 7.567e-05 -0.003041 -4.637e-06 -4.827e-07 delta_leisure_wknd 2.4505e-04 8.532e-05 -6.774e-05 1.083e-05 7.624e-06 gamma_leisure delta_work delta_school delta_shopping delta_private alpha_base -0.006823 0.005650 0.005515 0.005597 0.005615 gamma_work -5.8253e-04 -0.002152 -1.0683e-04 -6.179e-05 -5.703e-05 gamma_school -1.7298e-04 1.2333e-04 -2.2873e-04 3.825e-06 1.861e-06 gamma_shopping -2.712e-06 4.550e-06 2.068e-06 -1.6228e-04 3.029e-07 gamma_private -1.060e-05 6.644e-06 7.242e-07 -6.348e-07 -2.1534e-04 gamma_leisure 0.013000 4.639e-05 -1.805e-05 -2.059e-05 -1.487e-05 delta_work 4.639e-05 0.004998 3.8083e-04 3.9197e-04 3.8867e-04 delta_school -1.805e-05 3.8083e-04 0.050441 3.8366e-04 3.8732e-04 delta_shopping -2.059e-05 3.9197e-04 3.8366e-04 0.001726 3.8697e-04 delta_private -1.487e-05 3.8867e-04 3.8732e-04 3.8697e-04 0.002290 delta_leisure -8.8798e-04 5.1000e-04 3.7852e-04 3.8833e-04 3.8100e-04 delta_work_FT -2.780e-05 -0.004564 2.160e-06 -7.659e-06 -1.094e-05 delta_work_wknd -2.842e-05 -8.7597e-04 3.903e-05 3.423e-06 2.608e-05 delta_school_young 1.455e-07 2.841e-05 -0.050221 4.725e-06 -6.547e-06 delta_leisure_wknd -5.3947e-04 -3.6577e-04 5.464e-05 2.392e-05 4.254e-05 delta_leisure delta_work_FT delta_work_wknd delta_school_young delta_leisure_wknd alpha_base 0.005592 -1.7215e-04 2.0563e-04 5.853e-05 2.4505e-04 gamma_work -4.347e-05 -0.004915 0.006178 7.567e-05 8.532e-05 gamma_school 3.478e-05 -1.0583e-04 -7.760e-05 -0.003041 -6.774e-05 gamma_shopping -2.691e-06 -6.964e-06 1.055e-05 -4.637e-06 1.083e-05 gamma_private -8.952e-07 -7.118e-06 6.501e-06 -4.827e-07 7.624e-06 gamma_leisure -8.8798e-04 -2.780e-05 -2.842e-05 1.455e-07 -5.3947e-04 delta_work 5.1000e-04 -0.004564 -8.7597e-04 2.841e-05 -3.6577e-04 delta_school 3.7852e-04 2.160e-06 3.903e-05 -0.050221 5.464e-05 delta_shopping 3.8833e-04 -7.659e-06 3.423e-06 4.725e-06 2.392e-05 delta_private 3.8100e-04 -1.094e-05 2.608e-05 -6.547e-06 4.254e-05 delta_leisure 0.001956 -3.144e-06 -3.6992e-04 -7.159e-06 -0.001715 delta_work_FT -3.144e-06 0.006653 -0.001224 -5.774e-05 -1.488e-06 delta_work_wknd -3.6992e-04 -0.001224 0.020415 -1.384e-05 0.001190 delta_school_young -7.159e-06 -5.774e-05 -1.384e-05 0.066311 6.146e-06 delta_leisure_wknd -0.001715 -1.488e-06 0.001190 6.146e-06 0.005097 Robust covariance matrix: alpha_base gamma_work gamma_school gamma_shopping gamma_private alpha_base 0.015039 0.006648 0.006141 7.4604e-04 5.3652e-04 gamma_work 0.006648 0.079079 0.011724 -3.0696e-04 0.001014 gamma_school 0.006141 0.011724 0.300470 -6.2128e-04 7.5429e-04 gamma_shopping 7.4604e-04 -3.0696e-04 -6.2128e-04 9.5370e-04 1.3059e-04 gamma_private 5.3652e-04 0.001014 7.5429e-04 1.3059e-04 0.004573 gamma_leisure 0.003705 0.003811 0.001502 4.8376e-04 -4.5306e-04 delta_work -0.001265 -0.002909 -0.002683 2.3988e-04 -7.3746e-04 delta_school 0.010458 0.009100 0.045074 4.1163e-04 1.0307e-04 delta_shopping 8.2320e-04 -9.9803e-04 0.001006 -2.4730e-04 -2.4934e-04 delta_private 7.5157e-04 0.001046 0.001523 -7.425e-05 -1.2223e-04 delta_leisure 9.255e-05 -0.001758 0.002269 -5.745e-05 -2.1639e-04 delta_work_FT -9.9547e-04 -0.012014 0.003376 -1.3693e-04 4.7884e-04 delta_work_wknd 0.002937 0.020236 0.001381 8.684e-05 6.9014e-04 delta_school_young -0.010108 -0.004020 -0.047002 -1.4012e-04 2.4370e-04 delta_leisure_wknd -5.941e-05 9.0874e-04 0.001588 -6.766e-05 3.241e-05 gamma_leisure delta_work delta_school delta_shopping delta_private alpha_base 0.003705 -0.001265 0.010458 8.2320e-04 7.5157e-04 gamma_work 0.003811 -0.002909 0.009100 -9.9803e-04 0.001046 gamma_school 0.001502 -0.002683 0.045074 0.001006 0.001523 gamma_shopping 4.8376e-04 2.3988e-04 4.1163e-04 -2.4730e-04 -7.425e-05 gamma_private -4.5306e-04 -7.3746e-04 1.0307e-04 -2.4934e-04 -1.2223e-04 gamma_leisure 0.015961 8.2700e-04 0.005252 -6.8351e-04 -6.2051e-04 delta_work 8.2700e-04 0.013326 0.004197 5.7882e-04 -4.0312e-04 delta_school 0.005252 0.004197 0.119530 -3.5687e-04 8.7801e-04 delta_shopping -6.8351e-04 5.7882e-04 -3.5687e-04 0.002716 7.1245e-04 delta_private -6.2051e-04 -4.0312e-04 8.7801e-04 7.1245e-04 0.003829 delta_leisure -0.001664 8.540e-05 3.5046e-04 8.8867e-04 0.001031 delta_work_FT -0.001236 -0.013172 -0.005041 -2.0933e-04 4.0090e-04 delta_work_wknd 0.003071 9.7593e-04 0.011726 -0.001205 -2.5946e-04 delta_school_young -0.004576 -0.008306 -0.119815 4.4858e-04 -0.001116 delta_leisure_wknd 4.1978e-04 1.5147e-04 -1.7541e-04 2.4589e-04 4.568e-06 delta_leisure delta_work_FT delta_work_wknd delta_school_young delta_leisure_wknd alpha_base 9.255e-05 -9.9547e-04 0.002937 -0.010108 -5.941e-05 gamma_work -0.001758 -0.012014 0.020236 -0.004020 9.0874e-04 gamma_school 0.002269 0.003376 0.001381 -0.047002 0.001588 gamma_shopping -5.745e-05 -1.3693e-04 8.684e-05 -1.4012e-04 -6.766e-05 gamma_private -2.1639e-04 4.7884e-04 6.9014e-04 2.4370e-04 3.241e-05 gamma_leisure -0.001664 -0.001236 0.003071 -0.004576 4.1978e-04 delta_work 8.540e-05 -0.013172 9.7593e-04 -0.008306 1.5147e-04 delta_school 3.5046e-04 -0.005041 0.011726 -0.119815 -1.7541e-04 delta_shopping 8.8867e-04 -2.0933e-04 -0.001205 4.4858e-04 2.4589e-04 delta_private 0.001031 4.0090e-04 -2.5946e-04 -0.001116 4.568e-06 delta_leisure 0.003187 5.8628e-04 -8.7440e-04 -2.9208e-04 -0.001780 delta_work_FT 5.8628e-04 0.018182 -0.006396 0.008273 -3.0016e-04 delta_work_wknd -8.7440e-04 -0.006396 0.038181 -0.005668 2.4377e-04 delta_school_young -2.9208e-04 0.008273 -0.005668 0.161431 0.001891 delta_leisure_wknd -0.001780 -3.0016e-04 2.4377e-04 0.001891 0.005471 Classical correlation matrix: alpha_base gamma_work gamma_school gamma_shopping gamma_private alpha_base 1.000 -7.570e-05 -2.127e-05 -7.596e-05 -6.629e-05 gamma_work -7.570e-05 1.000000 -0.002750 -0.003780 -0.003909 gamma_school -2.127e-05 -0.002750 1.000000 -2.8654e-04 -6.3947e-04 gamma_shopping -7.596e-05 -0.003780 -2.8654e-04 1.000000 2.2619e-04 gamma_private -6.629e-05 -0.003909 -6.3947e-04 2.2619e-04 1.000000 gamma_leisure -9.074e-05 -0.017176 -0.002589 -8.8209e-04 -0.001845 delta_work 1.2117e-04 -0.102325 0.002977 0.002387 0.001865 delta_school 3.723e-05 -0.001599 -0.001738 3.4143e-04 6.401e-05 delta_shopping 2.0432e-04 -0.005001 1.5715e-04 -0.144862 -3.0336e-04 delta_private 1.7792e-04 -0.004007 6.639e-05 2.3470e-04 -0.089333 delta_leisure 1.9171e-04 -0.003304 0.001342 -0.002256 -4.0176e-04 delta_work_FT -3.200e-06 -0.202556 -0.002214 -0.003166 -0.001732 delta_work_wknd 2.182e-06 0.145370 -9.2691e-04 0.002737 9.0314e-04 delta_school_young 3.447e-07 9.8791e-04 -0.020152 -6.6779e-04 -3.721e-05 delta_leisure_wknd 5.205e-06 0.004018 -0.001619 0.005627 0.002120 gamma_leisure delta_work delta_school delta_shopping delta_private alpha_base -9.074e-05 1.2117e-04 3.723e-05 2.0432e-04 1.7792e-04 gamma_work -0.017176 -0.102325 -0.001599 -0.005001 -0.004007 gamma_school -0.002589 0.002977 -0.001738 1.5715e-04 6.639e-05 gamma_shopping -8.8209e-04 0.002387 3.4143e-04 -0.144862 2.3470e-04 gamma_private -0.001845 0.001865 6.401e-05 -3.0336e-04 -0.089333 gamma_leisure 1.000000 0.005755 -7.0495e-04 -0.004347 -0.002725 delta_work 0.005755 1.000000 0.023984 0.133468 0.114888 delta_school -7.0495e-04 0.023984 1.000000 0.041123 0.036041 delta_shopping -0.004347 0.133468 0.041123 1.000000 0.194679 delta_private -0.002725 0.114888 0.036041 0.194679 1.000000 delta_leisure -0.176080 0.163094 0.038104 0.211358 0.180019 delta_work_FT -0.002989 -0.791506 1.1793e-04 -0.002260 -0.002804 delta_work_wknd -0.001744 -0.086715 0.001216 5.7665e-04 0.003815 delta_school_young 4.956e-06 0.001560 -0.868354 4.4175e-04 -5.3131e-04 delta_leisure_wknd -0.066272 -0.072464 0.003408 0.008064 0.012453 delta_leisure delta_work_FT delta_work_wknd delta_school_young delta_leisure_wknd alpha_base 1.9171e-04 -3.200e-06 2.182e-06 3.447e-07 5.205e-06 gamma_work -0.003304 -0.202556 0.145370 9.8791e-04 0.004018 gamma_school 0.001342 -0.002214 -9.2691e-04 -0.020152 -0.001619 gamma_shopping -0.002256 -0.003166 0.002737 -6.6779e-04 0.005627 gamma_private -4.0176e-04 -0.001732 9.0314e-04 -3.721e-05 0.002120 gamma_leisure -0.176080 -0.002989 -0.001744 4.956e-06 -0.066272 delta_work 0.163094 -0.791506 -0.086715 0.001560 -0.072464 delta_school 0.038104 1.1793e-04 0.001216 -0.868354 0.003408 delta_shopping 0.211358 -0.002260 5.7665e-04 4.4175e-04 0.008064 delta_private 0.180019 -0.002804 0.003815 -5.3131e-04 0.012453 delta_leisure 1.000000 -8.7159e-04 -0.058535 -6.2852e-04 -0.543125 delta_work_FT -8.7159e-04 1.000000 -0.104998 -0.002749 -2.5553e-04 delta_work_wknd -0.058535 -0.104998 1.000000 -3.7628e-04 0.116656 delta_school_young -6.2852e-04 -0.002749 -3.7628e-04 1.000000 3.3432e-04 delta_leisure_wknd -0.543125 -2.5553e-04 0.116656 3.3432e-04 1.000000 Robust correlation matrix: alpha_base gamma_work gamma_school gamma_shopping gamma_private alpha_base 1.000000 0.19278 0.09135 0.19699 0.064693 gamma_work 0.192785 1.00000 0.07606 -0.03535 0.053335 gamma_school 0.091352 0.07606 1.00000 -0.03670 0.020348 gamma_shopping 0.196991 -0.03535 -0.03670 1.00000 0.062530 gamma_private 0.064693 0.05334 0.02035 0.06253 1.000000 gamma_leisure 0.239110 0.10727 0.02169 0.12399 -0.053027 delta_work -0.089332 -0.08960 -0.04240 0.06729 -0.094464 delta_school 0.246666 0.09360 0.23784 0.03855 0.004408 delta_shopping 0.128805 -0.06810 0.03522 -0.15365 -0.070746 delta_private 0.099046 0.06009 0.04491 -0.03886 -0.029210 delta_leisure 0.013367 -0.11072 0.07331 -0.03295 -0.056677 delta_work_FT -0.060201 -0.31683 0.04567 -0.03288 0.052511 delta_work_wknd 0.122585 0.36828 0.01289 0.01439 0.052227 delta_school_young -0.205136 -0.03558 -0.21341 -0.01129 0.008969 delta_leisure_wknd -0.006550 0.04369 0.03918 -0.02962 0.006480 gamma_leisure delta_work delta_school delta_shopping delta_private alpha_base 0.23911 -0.08933 0.246666 0.12880 0.09905 gamma_work 0.10727 -0.08960 0.093596 -0.06810 0.06009 gamma_school 0.02169 -0.04240 0.237843 0.03522 0.04491 gamma_shopping 0.12399 0.06729 0.038553 -0.15365 -0.03886 gamma_private -0.05303 -0.09446 0.004408 -0.07075 -0.02921 gamma_leisure 1.00000 0.05670 0.120244 -0.10381 -0.07938 delta_work 0.05670 1.00000 0.105148 0.09621 -0.05644 delta_school 0.12024 0.10515 1.000000 -0.01981 0.04104 delta_shopping -0.10381 0.09621 -0.019807 1.00000 0.22094 delta_private -0.07938 -0.05644 0.041043 0.22094 1.00000 delta_leisure -0.23333 0.01310 0.017956 0.30205 0.29516 delta_work_FT -0.07255 -0.84620 -0.108125 -0.02979 0.04805 delta_work_wknd 0.12439 0.04327 0.173569 -0.11837 -0.02146 delta_school_young -0.09016 -0.17908 -0.862537 0.02142 -0.04490 delta_leisure_wknd 0.04492 0.01774 -0.006859 0.06379 9.9804e-04 delta_leisure delta_work_FT delta_work_wknd delta_school_young delta_leisure_wknd alpha_base 0.01337 -0.06020 0.12258 -0.205136 -0.006550 gamma_work -0.11072 -0.31683 0.36828 -0.035580 0.043688 gamma_school 0.07331 0.04567 0.01289 -0.213414 0.039178 gamma_shopping -0.03295 -0.03288 0.01439 -0.011293 -0.029619 gamma_private -0.05668 0.05251 0.05223 0.008969 0.006480 gamma_leisure -0.23333 -0.07255 0.12439 -0.090158 0.044920 delta_work 0.01310 -0.84620 0.04327 -0.179079 0.017739 delta_school 0.01796 -0.10812 0.17357 -0.862537 -0.006859 delta_shopping 0.30205 -0.02979 -0.11837 0.021423 0.063786 delta_private 0.29516 0.04805 -0.02146 -0.044897 9.9804e-04 delta_leisure 1.00000 0.07702 -0.07927 -0.012877 -0.426302 delta_work_FT 0.07702 1.00000 -0.24276 0.152706 -0.030095 delta_work_wknd -0.07927 -0.24276 1.00000 -0.072192 0.016866 delta_school_young -0.01288 0.15271 -0.07219 1.000000 0.063645 delta_leisure_wknd -0.42630 -0.03009 0.01687 0.063645 1.000000 20 most extreme outliers in terms of lowest average per choice prediction: ID Avg prob per choice 2146576 1.310637e-06 9902059 1.643740e-05 9880000 2.639044e-05 6292582 3.777538e-05 3051038 6.564098e-05 8415029 6.887052e-05 8530000 7.160681e-05 9230000 7.424636e-05 7560000 8.725052e-05 8494828 9.341743e-05 1226238 9.510233e-05 5436896 9.791497e-05 7177352 9.978854e-05 6689995 1.057266e-04 1566942 1.153970e-04 3730000 1.300521e-04 2942411 1.303236e-04 9216479 1.404911e-04 6490000 1.465985e-04 2119561 1.511235e-04 Changes in parameter estimates from starting values: Initial Estimate Difference alpha_base 0.000 -19.1941 -19.1941 gamma_work 1.000 4.8989 3.8989 gamma_school 1.000 3.0986 2.0986 gamma_shopping 1.000 0.4264 -0.5736 gamma_private 1.000 0.6200 -0.3800 gamma_leisure 1.000 2.0958 1.0958 delta_work 0.000 -3.7172 -3.7172 delta_school 0.000 -7.4183 -7.4183 delta_shopping 0.000 -3.8044 -3.8044 delta_private 0.000 -4.2786 -4.2786 delta_leisure 0.000 -3.4001 -3.4001 delta_work_FT 0.000 1.3248 1.3248 delta_work_wknd 0.000 -2.8609 -2.8609 delta_school_young 0.000 2.3442 2.3442 delta_leisure_wknd 0.000 0.2949 0.2949 sig 1.000 1.0000 0.0000 Settings and functions used in model definition: apollo_control -------------- Value modelName "MDCEV_with_outside_good" modelDescr "MDCEV model on time use data, alpha-gamma profile with outside good and socio-demographics" indivID "indivID" outputDirectory "output/" debug "FALSE" 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 second derivative of LL (using numDeriv) Scaling used in computing Hessian --------------------------------- Value alpha_base 19.1941431 gamma_work 4.8988658 gamma_school 3.0985861 gamma_shopping 0.4264227 gamma_private 0.6200131 gamma_leisure 2.0957905 delta_work 3.7172129 delta_school 7.4182725 delta_shopping 3.8043551 delta_private 4.2786335 delta_leisure 3.4000988 delta_work_FT 1.3248265 delta_work_wknd 2.8609026 delta_school_young 2.3441826 delta_leisure_wknd 0.2948779 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() ### Define individual alternatives alternatives = c("outside", "work", "school", "shopping", "private", "leisure") ### Define availabilities avail = list(outside = 1, work = 1, school = 1, shopping = 1, private = 1, leisure = 1) ### Define continuous consumption for individual alternatives continuousChoice = list(outside = t_outside/60, work = t_a02/60, school = t_a03/60, shopping = t_a04/60, private = t_a05/60, leisure = t_leisure/60) ### Define utilities for individual alternatives V = list() V[["outside"]] = 0 V[["work"]] = delta_work + delta_work_FT * occ_full_time + delta_work_wknd * weekend V[["school"]] = delta_school + delta_school_young * (age<=30) V[["shopping"]] = delta_shopping V[["private"]] = delta_private V[["leisure"]] = delta_leisure + delta_leisure_wknd*weekend ### Define alpha parameters alpha = list(outside = 1 /(1 + exp(-alpha_base)), work = 1 /(1 + exp(-alpha_base)), school = 1 /(1 + exp(-alpha_base)), shopping = 1 /(1 + exp(-alpha_base)), private = 1 /(1 + exp(-alpha_base)), leisure = 1 /(1 + exp(-alpha_base))) ### Define gamma parameters gamma = list(work = gamma_work, school = gamma_school, shopping = gamma_shopping, private = gamma_private, leisure = gamma_leisure) ### Define costs for individual alternatives cost = list(outside = 1, work = 1, school = 1, shopping = 1, private = 1, leisure = 1) ### Define settings for MDCEV model mdcev_settings <- list(alternatives = alternatives, avail = avail, continuousChoice = continuousChoice, utilities = V, alpha = alpha, gamma = gamma, sigma = sig, cost = cost, budget = 24) ### Compute probabilities using MDCEV model P[["model"]] = apollo_mdcev(mdcev_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) }