With constraints it is usually not possible to also balance all attribute levels.
You could impose attribute level constraints in combination with the modified Federov algorithm, for example in the script below.
- Code: Select all
Design
;alts=alt1*,alt2*,alt3
;rows=24
;block=2
;eff=(mnl,d)
;alg = mfederov
;reject:
alt1.anonym=0 and alt1.price>0, alt2.anonym=0 and alt2.price>0,
alt1.anonym=1 and alt1.price=0, alt2.anonym=1 and alt2.price=0
;con
;model:
U(alt1) = b0[0.00001]
+ b1.dummy[0.000004|0.000003|0.000002|0.000001|0.000001] * locate[5,4,3,2,1,0]
+ b2.dummy[0.000002|0.000001|0.000001] * pretest[3,2,1,0]
+ b3.dummy [0.000002|0.000001|0.000001] * posttest[3,2,1,0]
+ b4.dummy[-0.000002] * anonym[1,0]
+ b5.dummy[0.000002] * method[1,0]
+ b6[-0.000004] * price[0,100,300,700](5-7,5-7,5-7,5-7)
/
U(alt2) = b0+b1*locate+b2* pretest+b3* posttest+b4*anonym+ b5 *method+b6*price
$
Usually it is not necessary to add attribute level constraints to categorical variables but you could if needed.
You could also use something like:
;eff = 1*(mnl,d) + 2*(imbalance)
This not only minimises the D-error but also minimises attribute level imbalance.
I refer to the Ngene manual for further explanations of the various properties.
Michiel