I like to interact a dummy variable with a continuous variable. Furthermore, the dummy variable should have the same level across all alternatives in a choice situation.
I read the relevant chapters of the manual on "Efficient designs with interactions" (7.2.9) and "Designs within designs: Designs with scenarios in Ngene" (8.5).
You can see my current model below.
Code: Select all
Design
? This design will generate an efficient design for MNL model
;alts = a, b, c
;rows = 12
;eff = (mnl,d)
;cond:
if(a.D = 1, b.D = 1 and c.D = 1),
if(a.D = 2, b.D = 2 and c.D = 2),
if(a.D = 3, b.D = 3 and c.D = 3)
;model:
U(a) = b1[-0.000001] * C[1,2,3,4] +
b2.dummy[0|0] * D[1,2,3] +
i1[-0.000001] * C * D.dummy[1] +
i2[-0.000002] * C * D.dummy[2] /
U(b) = b1 * C +
b2 * D +
i1 * C * D.dummy[1] +
i2 * C * D.dummy[2] /
U(c) = b1 * C +
b2 * D +
i1 * C * D.dummy[1] +
i2 * C * D.dummy[2]
$
Therefore I decided to keep this part in the utility functions and set the parameters to zero to ensure that D does not affect utility.
I also tried to use "D[D]" in the utility functions of alternatives "b" and "c" (see chapter 8.5 of the manual) to signal that the level of D should be the same across alternatives. However, I get the error message "The level '1' specified in dummy or effects coded variable is not one of the levels of that attribute 'b.d'.". Therefore, I deleted "[D]" and included the conditions to ensure that D has the same level across the alternatives.
Is my approach the correct way of implementing my model in Ngene, or is there a more efficient way?
Kind regards
Andy Obermeyer