Announcement

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

  • inequality constraint in mixlogit

    Hello.

    In the mixlogit model, is it possible to add a positive coefficient constraint for one of the coefficients?
    I know we can add 'constraints( )' but it does not allow any inequality or boundary constraints.

    If the boundary constraints are not possible in mixlogit, could you suggest other function code which estimates a mixed logit or random coefficient probit model and allows the positive constraints?

    Thank you!

  • #2
    You cannot impose an inequality constraint. In principle you can write a program that estimates your model with the constraint, but a mixlogit is such a complicated model that I would not want to do so.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi,everyone
      I neet to use mixlogit to excute random coefficent model,but the data I have does not have the group and choice variable.How to generate these two varibles based on brand1-brand4?
      clear
      input byte PanID double Expend byte(Income HHSize) int IPT byte(Quantity Brand1 Brand2 Brand3 Brand4 Feature1 Feature2 Feature3 Feature4) double(Price1 Price2 Price3 Price4) byte PanelistFirstObs
      1 40.900002 9 2 5 2 0 0 0 1 0 0 0 0 .108 .081 .061000001 .079000004 1
      1 16.809999 9 2 5 2 0 1 0 0 0 0 0 0 .108 .097999997 .064000003 .075000003 0
      1 4.0599999 9 2 1 2 0 1 0 0 0 0 0 0 .108 .097999997 .061000001 .086000003 0
      1 34.459999 9 2 4 2 0 1 0 0 0 0 0 0 .108 .097999997 .061000001 .086000003 0
      1 8.3900003 9 2 7 2 0 1 0 0 0 0 0 0 .125 .097999997 .048999999 .079000004 0
      1 60.990002 9 2 3 2 0 1 0 0 0 0 0 0 .108 .092 .050000001 .079000004 0
      1 20.790001 9 2 4 1 0 1 0 0 0 0 0 0 .103 .081 .048999999 .079000004 0
      1 33.950001 9 2 8 2 0 0 0 1 0 0 0 0 .108 .086000003 .054000001 .079000004 0
      2 3.6900001 7 2 5 1 1 0 0 0 0 0 0 0 .108 .097999997 .050000001 .079000004 1
      2 50.93 7 2 2 1 1 0 0 0 0 0 0 0 .108 .097999997 .050000001 .079000004 0
      2 18.35 7 2 2 1 1 0 0 0 0 0 0 0 .108 .097999997 .050000001 .079000004 0
      2 31.91 7 2 2 1 1 0 0 0 0 0 0 0 .108 .097999997 .050000001 .079000004 0
      2 25.27 7 2 2 6 0 0 0 1 0 0 0 0 .108 .081 .050000001 .086000003 0
      2 35.700001 7 2 2 2 0 0 0 1 0 0 0 0 .108 .081 .050000001 .086000003 0
      2 30.65 7 2 4 2 0 0 0 1 0 0 0 0 .108 .081 .050000001 .079000004 0
      2 58.259998 7 2 2 8 0 0 0 1 0 0 0 0 .108 .081 .050000001 .079000004 0
      Thanks a lot!

      Comment

      Working...
      X