Page 1 of 1

Design with scenarios - interaction terms

PostPosted: Wed Sep 14, 2022 7:32 am
by rebekah_hall
Hello, I am trying to create a design for a health based DCE. I plan to have two scenarios (different symptom types) that will vary across choice tasks but remain the same for the alternatives within a given choice task.

I would like to be able to estimate the impact of the scenarios on the attributes within the model so as I understand this would involve using interaction terms. I have consulted sections 7.2 (interaction terms) and 8.5 (scenarios) and attempted to do this with the code below but I am getting an error ("Error: The level '1' specified in dummy or effects coded variable is not one of the levels of that attribute 'alt2.scenario'."). Are you able to offer any insights on where I am going wrong?


Code: Select all
Design   
; alts = alt1*, alt2*, alt3   
; rows =12   
; eff = (mnl,d)
; cond:
if (alt1.A = 0, alt1.B=0),
if (alt1.A = 0, alt1.C=0),
if (alt2.A = 0, alt2.B=0),
if (alt2.A = 0, alt2.C=0)
; model: 
U( alt1 ) = b1.dummy [-0.0001|-0.0002] * A[1,2,0] 
               + b2.dummy[0.0001|0.0002] * B[1,2,0] 
               + b3.dummy[-0.0001|-0.0002] * C[1,2,0] 
               + b4.dummy[-0.0001|-0.0002] * D[1,2,0]   
               + b5[0.0001] *SCENARIO[1,2]
               +i1[0.001] *A.dummy[1] * SCENARIO.dummy[1]
               +i2[0.001] *A.dummy[2]*SCENARIO.dummy[1]
               +i3[-0.001] *B.dummy[1]*SCENARIO.dummy[1]
               +i4[-0.001] *B.dummy[2]*SCENARIO.dummy[1]
               +i5[0.001] *C.dummy[1]*SCENARIO.dummy[1]
               +i6[0.001] *C.dummy[2]*SCENARIO.dummy[1]
               +i7[0.001] *D.dummy[1]*SCENARIO.dummy[1]
               +i8[0.001] *D.dummy[2]*SCENARIO.dummy[1]
               / 

U( alt2 ) =  b1 * A
               + b2 * B
               + b3 * C
               + b4 * D 
        + b5 * SCENARIO[SCENARIO]
               +i1 *A.dummy[1] * SCENARIO.dummy[1]
               +i2 *A.dummy[2]*SCENARIO.dummy[1]
               +i3 *B.dummy[1]*SCENARIO.dummy[1]
               +i4 *B.dummy[2]*SCENARIO.dummy[1]
               +i5 *C.dummy[1]*SCENARIO.dummy[1]
               +i6 *C.dummy[2]*SCENARIO.dummy[1]
               +i7 *D.dummy[1]*SCENARIO.dummy[1]
               +i8 *D.dummy[2]*SCENARIO.dummy[1]


U(alt3) = b6[-0.0003] 
$



I am also wondering, given the categorical coding (and need for many interaction terms) and the fact I only have two scenarios. Is there a benefit to using this approach over collecting the data as two separate studies (i.e. different but matched samples) and comparing data based on ratios or with scale adjustment? I have posed this question to a few colleagues but it seems no there is no consensus.

Thank you for any advice you can offer.
Rebekah

Re: Design with scenarios - interaction terms

PostPosted: Wed Sep 14, 2022 7:57 am
by Michiel Bliemer
Your mistake was in not declaring scenario as dummy coded but then using it in the interaction as dummy coded.
The following syntax will work:

Code: Select all
Design   
; alts = alt1*, alt2*, alt3   
; rows =12   
; eff = (mnl,d)
; cond:
if (alt1.A = 0, alt1.B=0),
if (alt1.A = 0, alt1.C=0),
if (alt2.A = 0, alt2.B=0),
if (alt2.A = 0, alt2.C=0)
; model:
U( alt1 ) = b1.dummy [-0.0001|-0.0002] * A[1,2,0]
               + b2.dummy[0.0001|0.0002] * B[1,2,0]
               + b3.dummy[-0.0001|-0.0002] * C[1,2,0]
               + b4.dummy[-0.0001|-0.0002] * D[1,2,0]   
               + b5[0.0001] *SCENARIO[0,1]
               +i1[0.001] *A.dummy[1] * SCENARIO
               +i2[0.001] *A.dummy[2]*SCENARIO
               +i3[-0.001] *B.dummy[1]*SCENARIO
               +i4[-0.001] *B.dummy[2]*SCENARIO
               +i5[0.001] *C.dummy[1]*SCENARIO
               +i6[0.001] *C.dummy[2]*SCENARIO
               +i7[0.001] *D.dummy[1]*SCENARIO
               +i8[0.001] *D.dummy[2]*SCENARIO
               /

U( alt2 ) =  b1 * A
               + b2 * B
               + b3 * C
               + b4 * D
        + b5 * SCENARIO[SCENARIO]
               +i1 *A.dummy[1] * SCENARIO
               +i2 *A.dummy[2]*SCENARIO
               +i3 *B.dummy[1]*SCENARIO
               +i4 *B.dummy[2]*SCENARIO
               +i5 *C.dummy[1]*SCENARIO
               +i6 *C.dummy[2]*SCENARIO
               +i7 *D.dummy[1]*SCENARIO
               +i8 *D.dummy[2]*SCENARIO

/
U(alt3) = b6[-0.0003]
$


You could also use the modified Federov algorithm and use the following syntax:

Code: Select all
design
;alts = alt1*, alt2*, optout   
;rows =12   
;eff = (mnl,d)
;alg = mfederov
;require:
alt1.SCENARIO = alt2.SCENARIO
;reject:
alt1.A = 0 and alt1.B > 0,
alt1.A = 0 and alt1.C > 0,
alt2.A = 0 and alt2.B > 0,
alt2.A = 0 and alt2.C > 0
;model:
U(alt1) = b1.dummy [-0.0001|-0.0002] * A[1,2,0]
        + b2.dummy[0.0001|0.0002]    * B[1,2,0]
        + b3.dummy[-0.0001|-0.0002]  * C[1,2,0]
        + b4.dummy[-0.0001|-0.0002]  * D[1,2,0]   
        + b5.dummy[0.0001]           * SCENARIO[2,1]
        + i1[0.001]                  * A.dummy[1] * SCENARIO.dummy[1]
        + i2[0.001]                  * A.dummy[2] * SCENARIO.dummy[1]
        + i3[-0.001]                 * B.dummy[1]*SCENARIO.dummy[1]
        + i4[-0.001]                 * B.dummy[2]*SCENARIO.dummy[1]
        + i5[0.001]                  * C.dummy[1]*SCENARIO.dummy[1]
        + i6[0.001]                  * C.dummy[2]*SCENARIO.dummy[1]
        + i7[0.001]                  * D.dummy[1]*SCENARIO.dummy[1]
        + i8[0.001]                  * D.dummy[2]*SCENARIO.dummy[1]
        /
U(alt2) = b1 * A
        + b2 * B
        + b3 * C
        + b4 * D
        + b5 * SCENARIO
        + i1 *A.dummy[1] * SCENARIO.dummy[1]
        + i2 *A.dummy[2] * SCENARIO.dummy[1]
        + i3 *B.dummy[1] * SCENARIO.dummy[1]
        + i4 *B.dummy[2] * SCENARIO.dummy[1]
        + i5 *C.dummy[1] * SCENARIO.dummy[1]
        + i6 *C.dummy[2] * SCENARIO.dummy[1]
        + i7 *D.dummy[1] * SCENARIO.dummy[1]
        + i8 *D.dummy[2] * SCENARIO.dummy[1]
        /
U(optout) = b6[-0.0003]
$


Regarding your other question:

If you give the same respondent both scenarios (this is referred to as a within-subject design), then if you find statistically significant interaction parameters then you know for sure that it was the scenario that impacted the preference towards the attributes.

If you split the experiment and give one group of respondents scenario 1 and another group scenario 2 and then estimate two separate parameters, then what do you conclude if you find differences? Is this due to the difference in scenario, or due to the difference in respondents? If you have a large sample size, then the latter effect will diminish, but with small sample sizes you may not be able to claim statistically significant differences. To compare two parameters across two models, you will need to account for the standard error of both parameters.

The within-subject design therefore gives you more statistical power in making comparisons across scenarios and hypothesis testing.

Michiel

Re: Design with scenarios - interaction terms

PostPosted: Wed Sep 14, 2022 8:24 am
by rebekah_hall
Thank you for such a quick response, I really appreciate your help with the code and clarification on my question!