Dummy and effect coding result for heterogeneity (sigma)
Posted: 09 Apr 2025, 13:07
Hi apollo team,
I have a couple of questions.
1. I ran a mixed logit model in Apollo (R) using seed in the control. The result for the significance of heterogeneity (nature of t-ratio for sd or sigma) for one attribute (with 3 levels) is not consistent across dummy and effect coding. It shows significant heterogeneity (sigma) for the dummy and not significant for effect coding. I tried altering the levels in the model, checked the data, removed opt-out, and estimated the model, but it did not help with the issue. The study has 2 unlabelled alternatives and an opt-out option.
I thought the underlying heterogeneity would be reflected no matter whichever coding style I chose. This is the issue with only 1 attribute (specificity).
I did get the answer from Michiel, mentioning, 'Dummy coding is interpreted to the base level, whereas effects coding is interpreted to the mean. While they describe identical behavior, the interpretation of the parameters, including any heterogeneity, is not directly comparable.'
But still the doubt is why the significance is seen with one type of coding (dummy) and not with the other (effect).
I would be really grateful for any advice I can get to understand and resolve this issue.
2. Also, when I compare the MNL result, the robust s.e in the result for dummy coding is almost double the one observed in the effect coding. Why is it so? Would the issue with the significance of sigma in mixed logit be related to these differences in s.e in the MNL model? Please help me in understanding this issue.
Please find the result below:
Dummy coding (MNL):
Effect coding(MNL):
Thank you in advance for your response.
Regards,
Asmita
I have a couple of questions.
1. I ran a mixed logit model in Apollo (R) using seed in the control. The result for the significance of heterogeneity (nature of t-ratio for sd or sigma) for one attribute (with 3 levels) is not consistent across dummy and effect coding. It shows significant heterogeneity (sigma) for the dummy and not significant for effect coding. I tried altering the levels in the model, checked the data, removed opt-out, and estimated the model, but it did not help with the issue. The study has 2 unlabelled alternatives and an opt-out option.
I thought the underlying heterogeneity would be reflected no matter whichever coding style I chose. This is the issue with only 1 attribute (specificity).
I did get the answer from Michiel, mentioning, 'Dummy coding is interpreted to the base level, whereas effects coding is interpreted to the mean. While they describe identical behavior, the interpretation of the parameters, including any heterogeneity, is not directly comparable.'
But still the doubt is why the significance is seen with one type of coding (dummy) and not with the other (effect).
I would be really grateful for any advice I can get to understand and resolve this issue.
2. Also, when I compare the MNL result, the robust s.e in the result for dummy coding is almost double the one observed in the effect coding. Why is it so? Would the issue with the significance of sigma in mixed logit be related to these differences in s.e in the MNL model? Please help me in understanding this issue.
Please find the result below:
Dummy coding (MNL):
Code: Select all
Model run by DELL using Apollo 0.3.5 on R 4.4.1 for Windows.
Please acknowledge the use of Apollo by citing Hess & Palma (2019)
DOI 10.1016/j.jocm.2019.100170
www.ApolloChoiceModelling.com
Model name : DCE3
Model description : MNL model_optout
Model run at : 2025-04-08 12:07:41.268232
Estimation method : bgw
Model diagnosis : Relative function convergence
Optimisation diagnosis : Maximum found
hessian properties : Negative definite
maximum eigenvalue : -38.027638
reciprocal of condition number : 0.0487212
Number of individuals : 218
Number of rows in database : 1962
Number of modelled outcomes : 1962
Number of cores used : 1
Model without mixing
LL(start) : -2155.48
LL at equal shares, LL(0) : -2155.48
LL at observed shares, LL(C) : -2044.09
LL(final) : -1864.93
Rho-squared vs equal shares : 0.1348
Adj.Rho-squared vs equal shares : 0.1288
Rho-squared vs observed shares : 0.0876
Adj.Rho-squared vs observed shares : 0.0823
AIC : 3755.86
BIC : 3828.43
Estimated parameters : 13
Time taken (hh:mm:ss) : 00:00:2.51
pre-estimation : 00:00:0.55
estimation : 00:00:0.18
post-estimation : 00:00:1.78
Iterations : 7
Unconstrained optimisation
Estimates:
Estimate Rob.s.e. Rob.t.rat.(0)
asc_alt 0.000000 NA NA
asc_alt3 -0.717078 0.15487 -4.63007
b_fasting_time_2 0.039763 0.08891 0.44724
b_fasting_time_3 0.006364 0.08309 0.07659
b_fasting_time_4 0.004219 0.09011 0.04682
b_invasiveness_2 0.435067 0.06827 6.37302
b_sensitivity_2 0.324704 0.08266 3.92833
b_sensitivity_3 0.656409 0.09819 6.68527
b_specificity_2 0.332911 0.06943 4.79477
b_specificity_3 0.756286 0.08074 9.36653
b_prediction_2 -0.375720 0.07169 -5.24121
b_cost_2 -0.491114 0.09378 -5.23660
b_cost_3 -0.856268 0.11842 -7.23055
b_cost_4 -1.671068 0.14756 -11.32494
Code: Select all
Model name : DCE3
Model description : MNL model
Model run at : 2025-04-08 11:58:59.885666
Estimation method : bgw
Model diagnosis : Relative function convergence
Optimisation diagnosis : Maximum found
hessian properties : Negative definite
maximum eigenvalue : -193.531857
reciprocal of condition number : 0.143077
Number of individuals : 218
Number of rows in database : 1962
Number of modelled outcomes : 1962
Number of cores used : 1
Model without mixing
LL(start) : -2155.48
LL at equal shares, LL(0) : -2155.48
LL at observed shares, LL(C) : -2044.09
LL(final) : -1864.93
Rho-squared vs equal shares : 0.1348
Adj.Rho-squared vs equal shares : 0.1288
Rho-squared vs observed shares : 0.0876
Adj.Rho-squared vs observed shares : 0.0823
AIC : 3755.86
BIC : 3828.43
Estimated parameters : 13
Time taken (hh:mm:ss) : 00:00:1.15
pre-estimation : 00:00:0.51
estimation : 00:00:0.14
post-estimation : 00:00:0.5
Iterations : 7
Unconstrained optimisation.
Estimates:
Estimate s.e. t.rat.(0) p(2-sided) Rob.s.e. Rob.t.rat.(0) p(2-sided)
asc_alt 0.694829 0.05944 11.68900 0.00000 0.11818 5.87961 4.112e-09
asc_alt3 0.000000 NA NA NA NA NA NA
b_Fast_1 -0.012586 0.05670 -0.22196 0.82434 0.05373 -0.23424 0.81480
b_Fast_2 0.027176 0.05431 0.50037 0.61682 0.05455 0.49815 0.61838
b_Fast_3 -0.006222 0.05810 -0.10709 0.91472 0.05281 -0.11783 0.90620
b_Inv_1 -0.217534 0.02937 -7.40614 1.301e-13 0.03413 -6.37302 1.853e-10
b_Sen_1 -0.327038 0.04451 -7.34734 2.023e-13 0.05447 -6.00363 1.929e-09
b_Sen_2 -0.002334 0.04325 -0.05396 0.95696 0.04282 -0.05450 0.95654
b_Spe_1 -0.363066 0.04807 -7.55283 4.263e-14 0.04515 -8.04047 8.882e-16
b_Spe_2 -0.030155 0.04139 -0.72855 0.46628 0.03618 -0.83342 0.40461
b_Pre_1 0.187860 0.02965 6.33659 2.349e-10 0.03584 5.24121 1.595e-07
b_Cost_1 0.754613 0.05678 13.28895 0.00000 0.07826 9.64268 0.00000
b_Cost_2 0.263499 0.05328 4.94528 7.603e-07 0.05618 4.68999 2.732e-06
b_Cost_3 -0.101656 0.05707 -1.78136 0.07485 0.05907 -1.72090 0.08527
Running Delta method computation for user-defined function using robust standard errors
Expression Value s.e. t-ratio (0)
b_Fast_4 -0.0084 0.0522 -0.16
b_Inv_2 0.2175 0.0341 6.37
b_Sen_3 0.3294 0.0526 6.26
b_Spe_3 0.3932 0.0433 9.08
b_Pre_2 -0.1879 0.0358 -5.24
b_Cost_4 -0.9165 0.0856 -10.71
Regards,
Asmita