Page 1 of 1

Pivot designs in Ngene with dummy variables

PostPosted: Sat Jun 30, 2018 2:04 am
by dov0101
Hello, we are trying to design a choice experiment that in its simplest form has the following syntax

? Model for a hypothetical choice experiment
? Optimal orthogonal in the difference choice designs
? 9 rows, 3 profiles + no-buy option in each row
? model for utility function based on product attributes only
? The price attribute utility is treated as linear
Design
;alts = alt1, alt2, alt3, none
;rows = 9
;orth = ood
;model:
U(alt1) = b1[-.2]*PRICE[1.1,1.9,2.7] + b2.dummy[.5|.4]*CERT[1,2,3] + b3.dummy[.5|.4]*BRAND[1,2,3]/
U(alt2) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /
U(alt3) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /
U(none) = b0[-1]
$

This code works perfectly (there is only one design with 9 rows, that is orthogonal).

We would like to consider a "status quo" (squo) option instead of a "none" option, since we assume that the consumer could choose to buy the usual pack of pasta instead of the ones we are proposing.
We then consulted the chapter "8.3 Reference or pivot (customized) designs" in the Ngene manual, but we noted that there is no instruction regarding designs with dummy variables and if we try to use them we obtain an error message.

We are aware that we could overcome the problem using the exploded code for the dummies, our problem is that we have a status quo that could change and that we should constrain the combinations and interactions.

We would like to consider the price of the squo option as a random variable (it is the price they remind they paid for the pasta they usually buy), the level for the attribute CERT should be a fourth dummy level (0), and the level for the attribute BRAND should be a fourth dummy level (0).

Any suggestion?

Re: Pivot designs in Ngene with dummy variables

PostPosted: Sat Jun 30, 2018 10:55 am
by johnr
Hi

Firstly, OOD will generally ignore the status quo when calculating the D-error. The mathematics for the algorithm does not allow for status quo or no choice, so in this respect, there is an inconsistency between what you are attempting and the math. That said, it doesn't mean you cannot use the design in practice, just that you might not be getting what you think you are getting.

Now to pivots - pivoting is a % shift from a numerical attribute - for example you might have pivot levels for time of -0.25, 0, and 0.25, such that a respondent with a status quo time of 50 minutes would have a design with levels of 37.5 minutes, 50 minutes and 62.25 minutes, whilst a respondent with a status quo of 20 minutes would see values of 15, 20 and 25. It makes no sense to pivot from categorical levels - e.g., what is -0.25, 0 and 0.25 of red?

Now for the bad news, you can put constraints on the design, but it won't allow you to keep orthogonality. So for example, this will work

Code: Select all
Design   
;alts = alt1, alt2, alt3, none
;rows = 9
;eff = (mnl,d)   
?;orth ?= ood
;alg = mfederov
;require:
none.cert = 1,
none.brand = 1
;model:   
U(alt1) = b1[-.2]*PRICE[1.1,1.9,2.7] + b2.dummy[.5|.4]*CERT[1,2,3] + b3.dummy[.5|.4]*BRAND[1,2,3]/   
U(alt2) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /   
U(alt3) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /   
U(none) = b0[-1] +  b1 *PRICE1[1.1] + b2.dummy * CERT[1,2,3] + b3.dummy *BRAND[1,2,3]
$   


But it won't be orthogonal.

john

Re: Pivot designs in Ngene with dummy variables

PostPosted: Sun Jul 01, 2018 1:15 am
by dov0101
Hello John,

thanks a lot for your feedback, it was very useful

johnr wrote:Firstly, OOD will generally ignore the status quo when calculating the D-error. The mathematics for the algorithm does not allow for status quo or no choice, so in this respect, there is an inconsistency between what you are attempting and the math. That said, it doesn't mean you cannot use the design in practice, just that you might not be getting what you think you are getting.


Yes, thanks for the explanation.
Actually, we do not want to create an OOD design, we would like to make an efficient design.

johnr wrote:Now to pivots - pivoting is a % shift from a numerical attribute - for example you might have pivot levels for time of -0.25, 0, and 0.25, such that a respondent with a status quo time of 50 minutes would have a design with levels of 37.5 minutes, 50 minutes and 62.25 minutes, whilst a respondent with a status quo of 20 minutes would see values of 15, 20 and 25. It makes no sense to pivot from categorical levels - e.g., what is -0.25, 0 and 0.25 of red?


Thanks for the explanation.
Thus, a pivot is what we want for the price variable.

johnr wrote:Now for the bad news, you can put constraints on the design, but it won't allow you to keep orthogonality. So for example, this will work

Code: Select all
Design   
;alts = alt1, alt2, alt3, none
;rows = 9
;eff = (mnl,d)   
?;orth ?= ood
;alg = mfederov
;require:
none.cert = 1,
none.brand = 1
;model:   
U(alt1) = b1[-.2]*PRICE[1.1,1.9,2.7] + b2.dummy[.5|.4]*CERT[1,2,3] + b3.dummy[.5|.4]*BRAND[1,2,3]/   
U(alt2) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /   
U(alt3) = b1 *PRICE + b2.dummy *CERT + b3.dummy *BRAND /   
U(none) = b0[-1] +  b1 *PRICE1[1.1] + b2.dummy * CERT[1,2,3] + b3.dummy *BRAND[1,2,3]
$   


But it won't be orthogonal.


Orthogonality is not a problem.

I used your suggestions and I came out with this code:

Code: Select all
Design   
;alts = squo, alt1, alt2, alt3
;rows = 8
;eff = (mnl,d)   
;alg = mfederov
;require:
squo.cert = 3,
squo.brand = 3
;model:   
U(squo) = bsquo[1] +  bprice[-.2] * PRICE.ref[1.9]             + bcert.effects[.2|.5|.4] * CERT[0,1,2,3] + bbrand.effects [.2|.5|.4] * BRAND[0,1,2,3]/
U(alt1) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         /   
U(alt2) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         /   
U(alt3) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         
$


It works, so it is a big step forward for us.
However, we would like to introduce more constraints like in this code:

Code: Select all
Design   
;alts = squo, alt1, alt2, alt3
;rows = 8
;eff = (mnl,d)   
;alg = mfederov
;require:
alt1.cert <> 3,
alt2.cert <> 3,
alt3.cert <> 3,
squo.cert = 3,
alt1.brand <> 3,
alt2.brand <> 3,
alt3.brand <> 3,
squo.brand = 3
;model:   
U(squo) = bsquo[1] +  bprice[-.2] * PRICE.ref[1.9]             + bcert.effects[.2|.5|.4] * CERT[0,1,2,3] + bbrand.effects [.2|.5|.4] * BRAND[0,1,2,3]/
U(alt1) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         /   
U(alt2) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         /   
U(alt3) =             bprice      * PRICE.piv[-40%,0%,40%,80%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         
$


Unfortunately, in this case most of the designs are invalid.
Can you suggest a solution that would allow to obtain something similar?

Thanks a lot.
Maurizio

Re: Pivot designs in Ngene with dummy variables

PostPosted: Tue Jul 03, 2018 8:14 pm
by johnr
Hi Maurizio

I'm not sure your model is identified. Dummy and effects coding work at the attribute level, not alternative level. Assume for example you have four seasons, summer, autumn, winter, spring and you want to dummy/effects code the variable. if you always have summer assigned to the first alternative, and never any other alternative, then summer is perfectly confounded with alternative 1. However, season needs to vary over all alternatives. Fixing on level to be only present in one alternative and not others, means that that level is effectively acting like a constant. So in your case, you effectively have three constants for alternative 1 - bsquo[1], CERT[3] and BRAND[3].

I wrote about this in problem in Cooper, B., Rose, J.M. and Crase, L. (2012) Does anybody like water restrictions? Some observations in Australian urban communities, Australian Journal of Agricultural and Resource Economics, 56(1), 61-51. I see it all the time, mainly in environmental economics. The paper discusses the solution.

John

Re: Pivot designs in Ngene with dummy variables

PostPosted: Tue Jul 03, 2018 9:24 pm
by dov0101
Hi John,
you are totally right, it was silly question.
I can get what I want just setting the constant for the status quo option if it is different from all the other alternatives.

This is the code I wrote, it seems to work pretty well.

Code: Select all
?Further attempt after suggestions by John Rose
? Here the alternatives cannot contain level 3 for CERT and BRAND
Design   
;alts = squo, alt1, alt2, alt3
;rows = 9
;eff = (mnl,d)   
;alg = mfederov
;model:   
U(squo) = bsquo[1] +  bprice[-.2] * PRICE.ref[1.9]/
U(alt1) =             bprice      * PRICE.piv[-40%,0%,40%] + bcert.effects[.5|.4] * CERT[1,2,3] + bbrand.effects [.2|.5] * BRAND[1,2,3]/   
U(alt2) =             bprice      * PRICE.piv[-40%,0%,40%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         /   
U(alt3) =             bprice      * PRICE.piv[-40%,0%,40%] + bcert.effects           * CERT          + bbrand.effects            * BRAND         
$





Thanks a lot for your feedback!
Maurizio