Dear Statalist,
I have unlabeled data from a discrete choice experiment. I am estimating a mixed logit model with the 'cmxtmixlogit' command.
After having estimated the model I want to obtain Average Marginal Effects for the fixed (x_1) and random coefficients (x_2 - x_7) in my model.
For this I use margins, dydx(*) after estimating the model.
What Stata gives me is the change in probability for each of the alternatives, given the outcomes. These results allow me to make a statement about how changing say x_1 changes the probability to choose an alternative, given that we observe a specific outcome. E.g. given we observe outcome 1, a change in x_1 decreases the probability to pick alternative 2 by -.0066778.
However, as I use unlabeled data, you can see that the results are in a way redundant, because the alternatives in unlabeled data have no meaning in itself. Therefore it does not matter which outcome and alternative I consider. Changing to another alternative, is essentially the same for each outcome.
What I would like to have is an estimate for how changing x_1 changes the overall probability to choose an alternative, not a specific one.
Is there a way to do this with the margins command?
Help is much appreciated.
Best
Marius
I have unlabeled data from a discrete choice experiment. I am estimating a mixed logit model with the 'cmxtmixlogit' command.
Code:
cmset id choice_set alternative cmxtmixlogit choice x_1, random(i.x_2 i.x_3 i.x_4 i.x_5 i.x_6 i.x_7, normal) nocons intp(100)
For this I use margins, dydx(*) after estimating the model.
Code:
. margins, dydx(x_1) Average marginal effects Number of obs = 9,540 Model VCE : OIM Expression : Pr(alternative), predict() dy/dx w.r.t. : x_1 ---------------------------------------------------------------------------------------- | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -----------------------+---------------------------------------------------------------- x_1| _outcome#alternative| 1 1 | .0133838 .0004739 28.24 0.000 .012455 .0143125 1 2 | -.0066778 .000239 -27.94 0.000 -.0071463 -.0062093 1 3 | -.006706 .0002349 -28.54 0.000 -.0071664 -.0062455 2 1 | -.0066778 .000239 -27.94 0.000 -.0071463 -.0062093 2 2 | .0133483 .0004728 28.23 0.000 .0124216 .0142751 2 3 | -.0066705 .000234 -28.51 0.000 -.0071291 -.0062119 3 1 | -.006706 .0002349 -28.54 0.000 -.0071664 -.0062455 3 2 | -.0066705 .000234 -28.51 0.000 -.0071291 -.0062119 3 3 | .0133765 .0004688 28.53 0.000 .0124576 .0142954 ----------------------------------------------------------------------------------------
However, as I use unlabeled data, you can see that the results are in a way redundant, because the alternatives in unlabeled data have no meaning in itself. Therefore it does not matter which outcome and alternative I consider. Changing to another alternative, is essentially the same for each outcome.
What I would like to have is an estimate for how changing x_1 changes the overall probability to choose an alternative, not a specific one.
Is there a way to do this with the margins command?
Help is much appreciated.
Best
Marius
Comment