Page 1 of 1

efficient design with status quo

Posted: Tue May 26, 2026 10:15 am
by wyjml008
Hi,

I am current generate a efficient design for non label design. This design includes alternative 1, alternative 2, status quo and no buy alternative. I have 3 attributes: price, vc, and life. The price has 5 levels. $299 is only for status quo, and other price levels are for alt1 and alt2. For vc, 9 is only for status quo, and others for alt1 and alt2. For life, 5 is only for status quo, and others for alt1 and alt2. Please see the codes below. I got the error message: "Error: An attribute has the wrong number of levels for dummy or effects coding. 'vc_sq'". Could you please provide some suggestions how to fix it?
Thanks so much for your help.

WeI

Code: Select all

 Design
;alts = alt1*, alt2*, alt3, nobuy
;rows = 10
;eff = (mnl, d)
;model:
U(alt1) = b0 + b1[-0.0001] * price[299, 374, 449, 524, 599] + 
               b2.dummy[0.0001|0.0002|0.0003|0.0004] * vc[15,30,45,60,9] + 
               b3.dummy[0.0001|0.0002|0.0003|0.004] * life[8,11,13,15,5] /

U(alt2) = b0 + b1 * price + b2 * vc + b3 * life /

U(alt3) = b0 + 
          b1 * price_sq[299] + 
          b2 * vc_sq[9] + 
          b3 * life_sq[5] 

$

Re: efficient design with status quo

Posted: Tue May 26, 2026 3:33 pm
by Michiel Bliemer
You are using b2 and b3 both as dummy coefficients in alt1 and alt2 while also as linear coefficient in alt3, which is incompatible.
If b2 and b3 are linear coefficients to numerical attributes vc and life, then you can use the script below. Note that with (near) zero priors, some attribute level combinations, like comparing alt1.vc = 15 with alt2.vc=60, are more common because using mostly outer-level comparisons is most efficient. Note that in the script below, I removed price=299 for alt1/alt2, vc=9 for alt1/alt2, and life=5 for alt1/alt2 since you mentioned that these levels only appear in the status quo alternative.

Code: Select all

Design
;alts = alt1*, alt2*, alt3, nobuy
;rows = 10
;eff = (mnl, d)
;model:
U(alt1) = b0 
        + b1[-0.0001] * price[374, 449, 524, 599] 
        + b2[ 0.0001] * vc[15,30,45,60] 
        + b3[ 0.0001] * life[8,11,13,15] 
        /

U(alt2) = b0 
        + b1 * price 
        + b2 * vc 
        + b3 * life 
        /

U(alt3) = b0 
        + b1 * price_sq[299] 
        + b2 * vc_sq[9] 
        + b3 * life_sq[5] 
$
If attributes vc and life are categorical, and their status quo levels in alt3 can also appear in alt1/atl2, then the script would become as in below, which allows Ngene to also avoid dominant alternatives between alt1/alt2 and alt3. Note that I increased the number of rows because there are quite a few dummy coded coefficients.

Code: Select all

Design
;alts = alt1*, alt2*, alt3, nobuy
;rows = 15
;eff = (mnl, d)
;alg = mfederov
;require:
alt3.vc = 9,
alt3.life = 5
;model:
U(alt1) = b0 
        + b1[-0.0001]                           * price[374, 449, 524, 599] 
        + b2.dummy[0.0001|0.0002|0.0003|0.0004] * vc[15,30,45,60,9] 
        + b3.dummy[0.0001|0.0002|0.0003|0.0004] * life[8,11,13,15,5] 
        /

U(alt2) = b0 
        + b1       * price 
        + b2.dummy * vc 
        + b3.dummy * life 
        /

U(alt3) = b0 
        + b1       * price_sq[299] 
        + b2.dummy * vc
        + b3.dummy * life
$
If vc=9 and life=5 cannot occur in alt1/alt2, while vc=9 and life=5 only occurs in alt3, then the model above becomes unidentified as the status quo levels are completely separated from the alt1/alt2 levels. In that case, vc=9 and life=5 are absorbed into the alternative-specific constant, so you will need a script something like the one below. Note that in this case, it is not possible to avoid dominant alternatives between alt1/alt2 and alt3 because the status quo alternative coefficients for the status quo levels cannot be separately identified for vc and life. So you may need to manually check if there are no obvious dominant alternatives with the status quo alternative, or you may need to specify additional cond; constraints.

Code: Select all

Design
;alts = alt1*, alt2*, alt3, nobuy
;rows = 15
;eff = (mnl, d)
;model:
U(alt1) = b0 
        + b1[-0.0001]                    * price[374, 449, 524, 599] 
        + b2.dummy[0.0001|0.0002|0.0003] * vc[30,45,60,15] 
        + b3.dummy[0.0001|0.0002|0.0003] * life[11,13,15,8] 
        /

U(alt2) = b0 
        + b1       * price 
        + b2.dummy * vc 
        + b3.dummy * life 
        /

U(alt3) = b_sq                       ? vc=9 and life=5 are absorbed into this constant 
        + b1       * price_sq[299] 
$
Michiel