Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Random utility model with mixlogit - obtaining marginal coefficients

    Hi,

    I am looking at a way of estimating the marginal utility of individual attributes levels in a discrete choice experiment dataset.

    To add a bit of context, I investigated the effect of 5 attributes on policy choices. Each of the choice-sets (8) showed 3 unlabeled alternatives for which the attributes levels were randomly generated. I did not include a status-quo or no-choice option. All my attributes contain discrete and sometimes abstract levels (visual aspect, management type, etc) that cannot be associated with some kind of ordinate scale. My goal is to be able to estimate respondent's utility for every single attribute level using conditional and mixed effect logit models. I would need something like:

    attribute1_level1 0.25
    attribute1_level2 0.022
    attribute2_level1 0.79
    .....
    attributeN_levelN .....

    For now, I tried variations of this, which yields me 5 coefficients : one per attribute. While being interesting, it is of little use to me.
    Code:
    mixlogit choice, group(group) id(id) rand(div cofe dens vis wtp)
    Code:
    Mixed logit model                               Number of obs     =     65,184
                                                    LR chi2(5)        =    3716.46
    Log likelihood = -18447.132                     Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
        response |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    Mean         |
             div |   .2495942   .0165369    15.09   0.000     .2171825     .282006
            cofe |   .0503646   .0137197     3.67   0.000     .0234744    .0772548
            dens |   .1490932   .0140055    10.65   0.000     .1216429    .1765434
             vis |   .1604829   .0121192    13.24   0.000     .1367297    .1842362
             wtp |  -.7906035   .0197152   -40.10   0.000    -.8292446   -.7519625
    -------------+----------------------------------------------------------------
    SD           |
             div |    .394038   .0233942    16.84   0.000     .3481862    .4398897
            cofe |   .3352769    .022335    15.01   0.000     .2915012    .3790527
            dens |   .3584852   .0220176    16.28   0.000     .3153314     .401639
             vis |   .2910277   .0181769    16.01   0.000     .2554015    .3266538
             wtp |   .8096008   .0200021    40.48   0.000     .7703974    .8488042

    After asking around, I was suggested to use the " i. " command along my independant variables, such as this:
    Code:
    mixlogit choice, group(group) id(id) rand(i.div i.cofe i.dens i.vis i.wtp)
    However, Stata returns me this error message:
    Code:
    factor-variable and time-series operators not allowed
    (error in option rand())
    r(101);
    Has someone who worked with unlabeled DCE data and tried to estimate random utility coefficients stumbled upon the problem?

    Thanks!

    Felix






  • #2
    Arne Risa Hole wrote -mixlogit- quite some time before the factor-variable operators became a major thing in Stata. If you'd like to use dummies, you should create them "manually", e.g., by typing -quietly tabulate div, gen(div_)-. Then you can include -div_2-, -div_3- and so on in your -rand()-. Note that since only differences in utility matter, you must drop one attribute-level dummy for each attribute to achieve identification.

    To be slightly pedantic: Please note that with traditional DCE data, you cannot identify utilities associated with all levels of an attribute. Since only differences in utility matter to the observed choices, all you can identify is the utility from one level relative to the utility from another level. For further discussion, please see my papers with Denise Doiron:

    2020. "Stated Preferences over Job Characteristics: a Panel Study," Canadian Journal of Economics, 53: 43-82. https://doi.org/10.1111/caje.12431

    2013. "The Use of Alternative Preference Elicitation Methods in Complex Discrete Choice Experiments," Journal of Health Economics, 32: 1166-1179. https://doi.org/10.1016/j.jhealeco.2013.09.009

    Comment

    Working...
    X