Constraints using the mfederov algorithm
Posted: Tue Nov 26, 2019 1:55 am
Hi all,
I am designing a partial profile choice experiment, in which 3 attributes are always held constant between two alternatives.
For this, I used the mfederov algorithm. all of my attributes (except the cost attribute) are dummy coded as the levels are discrete. I also included interactions effects.
Here is my syntax:
Design
;alts = alt1*, alt2*, OptOut
;rows = 40
;block = 4
;eff= (mnl, d)
;alg = mfederov(candidates = C:\Users\u0127847\Box Sync\Thesis\CE horizontal collaboration\Ngene\DCE_machinery sharing project\DCEMachinery_PP3 project files\DCE attributes_4payment_25Nov.xlsx)
;cond:
if(alt1.purchasingExit=5, alt1.laboursharing=2),
if(alt2.purchasingExit=5, alt2.laboursharing=2)
;model :
U(alt1) =
b1.dummy[-0.001] * freedomentry[1, 2]
+ b2.dummy[-0.001|-0.001|-0.001|-0.001] * purchasingExit[1, 2, 3,4,5]
+ b3.dummy[0.001|0.001] * machinerydist[3, 2, 1]
+ b4.dummy[0.001|0.001] * soilmanagement[1,2,3]
+ b5.dummy[0.001|0.001|0.001] * Fert and pest management[1,2,3,4]
+ b6.dummy[-0.001|0.001|0.001] * labour sharing[4,2,3,1]
+ b8.dummy[0.001|0.001|0.001] * knowledgesharing[4,2,3,1]
+ b9[-0.001] * ongoingpayment [1,2,3,4]
+ i1[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[2]
+ i2[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[3]
+ i3[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[4]
+ i4[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[2]
+ i5[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[3]
+ i6[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[2]
+ i7[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[3]
+ i8[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[4]
+ i9[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[2]
+ i10[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[3]
+ i11[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[2]
+ i12[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[3]
+ i13[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[2]
+ i14[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[3]
+ i15[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[2]
+ i16[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[3]
/
U(alt2) =
b1.dummy * freedomentry
+ b2.dummy* purchasingExit
+ b3.dummy * machinerydist
+ b4.dummy* soilmanagement
+ b5.dummy * Fert and pest management
+ b6.dummy* labour sharing
+ b8.dummy * knowledgesharing
+ b9.dummy * ongoingpayment
+ i1[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[2]
+ i2[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[3]
+ i3[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[4]
+ i4[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[2]
+ i5[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[3]
+ i6[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[2]
+ i7[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[3]
+ i8[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[4]
+ i9[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[2]
+ i10[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[3]
+ i11[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[2]
+ i12[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[3]
+ i13[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[2]
+ i14[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[3]
+ i15[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[2]
+ i16[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[3]
/
U(OptOut) = b0[-0.001]
$
As you can see, I tried to constrain the design such that level 5 of attribute 'PurchasingExit' should always co-occur with level 2 of attribute 'laboursharing'. However, when I try to run my design, I get the following error message:
Error: Conditionals (;cond) are not compatible with the Modified Federov algorithm (;alg=mfederov).
I gather using if-then constraints is not possible with the mfederov algorithm.
Is there some other way I can introduce this constraint into my design? Should I use a different algorithm, or use the 'require' constraint instead? (however, I can't seem to figure out whether it is possible to use the require constraint to fix two levels to always co-occur).
Thanks in advance!
Kato
I am designing a partial profile choice experiment, in which 3 attributes are always held constant between two alternatives.
For this, I used the mfederov algorithm. all of my attributes (except the cost attribute) are dummy coded as the levels are discrete. I also included interactions effects.
Here is my syntax:
Design
;alts = alt1*, alt2*, OptOut
;rows = 40
;block = 4
;eff= (mnl, d)
;alg = mfederov(candidates = C:\Users\u0127847\Box Sync\Thesis\CE horizontal collaboration\Ngene\DCE_machinery sharing project\DCEMachinery_PP3 project files\DCE attributes_4payment_25Nov.xlsx)
;cond:
if(alt1.purchasingExit=5, alt1.laboursharing=2),
if(alt2.purchasingExit=5, alt2.laboursharing=2)
;model :
U(alt1) =
b1.dummy[-0.001] * freedomentry[1, 2]
+ b2.dummy[-0.001|-0.001|-0.001|-0.001] * purchasingExit[1, 2, 3,4,5]
+ b3.dummy[0.001|0.001] * machinerydist[3, 2, 1]
+ b4.dummy[0.001|0.001] * soilmanagement[1,2,3]
+ b5.dummy[0.001|0.001|0.001] * Fert and pest management[1,2,3,4]
+ b6.dummy[-0.001|0.001|0.001] * labour sharing[4,2,3,1]
+ b8.dummy[0.001|0.001|0.001] * knowledgesharing[4,2,3,1]
+ b9[-0.001] * ongoingpayment [1,2,3,4]
+ i1[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[2]
+ i2[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[3]
+ i3[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[4]
+ i4[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[2]
+ i5[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[3]
+ i6[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[2]
+ i7[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[3]
+ i8[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[4]
+ i9[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[2]
+ i10[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[3]
+ i11[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[2]
+ i12[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[3]
+ i13[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[2]
+ i14[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[3]
+ i15[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[2]
+ i16[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[3]
/
U(alt2) =
b1.dummy * freedomentry
+ b2.dummy* purchasingExit
+ b3.dummy * machinerydist
+ b4.dummy* soilmanagement
+ b5.dummy * Fert and pest management
+ b6.dummy* labour sharing
+ b8.dummy * knowledgesharing
+ b9.dummy * ongoingpayment
+ i1[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[2]
+ i2[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[3]
+ i3[0.001] * soilmanagement.dummy[1] * purchasingExit.dummy[4]
+ i4[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[2]
+ i5[0.001] * soilmanagement.dummy[1] * knowledgesharing.dummy[3]
+ i6[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[2]
+ i7[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[3]
+ i8[0.001] * soilmanagement.dummy[2] * purchasingExit.dummy[4]
+ i9[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[2]
+ i10[0.001] * soilmanagement.dummy[2] * knowledgesharing.dummy[3]
+ i11[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[2]
+ i12[0.001] * Fert and pest management.dummy[1] * labour sharing.dummy[3]
+ i13[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[2]
+ i14[0.001] * Fert and pest management.dummy[1] * knowledgesharing.dummy[3]
+ i15[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[2]
+ i16[0.001] * Fert and pest management.dummy[2] * knowledgesharing.dummy[3]
/
U(OptOut) = b0[-0.001]
$
As you can see, I tried to constrain the design such that level 5 of attribute 'PurchasingExit' should always co-occur with level 2 of attribute 'laboursharing'. However, when I try to run my design, I get the following error message:
Error: Conditionals (;cond) are not compatible with the Modified Federov algorithm (;alg=mfederov).
I gather using if-then constraints is not possible with the mfederov algorithm.
Is there some other way I can introduce this constraint into my design? Should I use a different algorithm, or use the 'require' constraint instead? (however, I can't seem to figure out whether it is possible to use the require constraint to fix two levels to always co-occur).
Thanks in advance!
Kato