Announcement

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

  • Coefficient constraints using asclogit

    Hello,

    I am using asclogit to estimate a model with both alternative-specific and case-specific variables. I would like to impose constraints on the case-specific variable coefficients so that they are the same across specific groups of alternatives. I believe I need to use the "constraints()" option, but do not understand exactly how to use the option. Below, I provide a short example of my problem.

    Assume n individuals are selecting among 50 automobiles and they have the option to not purchase (i.e., there are k=51 alternatives). I have an alternative-specific independent variable in "mileage" and a case-specific variable in "male." If I run:

    asclogit choice mileage, case(id) alternatives(automobile) casevars(male)

    then state will estimate 1 mileage coefficient, 50 male coefficients, and 50 constant coefficients. I would like to hold the effect of "male" fixed across automobile options so that being male affects only the likelihood of purchasing any car, rather than the likelihood of selecting a particular car. Stata would then only return 1 male coefficient. I would also like to know how to hold the constant coefficient fixed across alternatives.

    Thank you.

  • #2
    I would not use the "contraints()" option in this case. Here is an alternative solution - this assumes that the "automobile" variable equals 51 for the "no purchase" option:

    Code:
    gen car_asc = automobile != 51
    gen car_male = car_asc * male
    asclogit choice mileage car_asc car_male, case(id) alternatives(automobile) noconst
    Arne

    Comment


    • #3
      Thank you, Arne. This is solution is much easier that what I had in mind.

      Comment

      Working...
      X