Hi,everyone,
I need to use mixlogit to excuete the random coefficent model,but the data has no choice and group as required by mixlogit.How can I generate these variables based on thechoice 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
2 24.43 7 2 3 2 0 0 0 1 0 0 0 0 .108 .081 .050000001 .079000004 0
2 16.49 7 2 1 4 0 0 0 1 0 0 0 0 .108 .081 .050000001 .081 0
2 4.2600002 7 2 1 4 0 0 0 1 0 0 0 0 .108 .081 .050000001 .079000004 0
end
Thanks a lot!
Thanks a lot!
Comment