Unbalanced attribute levels

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Unbalanced attribute levels

Postby polyama » Fri Aug 23, 2024 8:38 am

Good morning,

I am developing design for a choice experiment about preferences for trees on grazing lands. There are two discrete attributes, A and B, and two continuous attributes, C and D. A has 4 levels 0 (no trees) and 1, 2, 3 are different configurations. B are species: 1 native, 2 exotics, and 0 none. C is the extent: 0%, 10%, 30%. D is cost equivalent: 1, 2, 3. For attribute A = 0, attributes B and C are 0. For attribute A =[1, 2, 3], B and C <> 0. I would like 2 unlabelled alternatives. When I try to formulate the design, NGENE cannot find valid design.

Code: Select all
Design
;alts = altA*, altB
;rows = 32
;block = 8
;eff=(mnl,d)

;cond:
if(alta.A = 0, alta.B = 0),
if(alta.A = 0, alta.C = 0),
if(altb.A = 0, altb.B = 0),
if(altb.A = 0, altb.C = 0),
if(alta.A <> 0, alta.B <> 0),
if(alta.A <> 0, alta.C <> 0),
if(altb.A <> 0, altb.B <> 0),
if(altb.A <> 0, altb.C <> 0)

;model:
U(altA) =               
b1.dummy[0.2|0.3|0.4]  * A[0, 1, 2, 3]  +
b2.dummy[0.1|0.2] * B[0, 1, 2]  +
b3[0.1]  * C[0, 10, 30] + 
b4[-0.1] * D[60, 90, 120]   /
U(altB) = b1 * A + b2 * B + b3 * C + b4 * D
$


What could be the approach for designing this choice experiment?

One approach I can think of is to use a labelled design with alt1 A=0 and alt2 A <> 0. But I would also like to explore tradeoffs between other combinations (where A <> 0) directly.
polyama
 
Posts: 2
Joined: Thu Aug 22, 2024 5:19 pm

Re: Unbalanced attribute levels

Postby Michiel Bliemer » Fri Aug 23, 2024 12:42 pm

The utility functions that you have specified, in conjunction with your constrained, is not identified. In other words, you cannot estimate that model. The reason is that you have linked the base levels 0 of A and B, they are perfectly correlated, so you cannot estimate separate parameters for them. These are the problematic constraints:

if(alta.A = 0, alta.B = 0),
if(altb.A = 0, altb.B = 0)

You will need to use a separate variable for trees/no_trees and then define A with 3 remaining levels and B with 2 remaining levels. So you first need to write out the appropriate utility functions on paper, something like:

U = b1.dummy * tree[1,0] + b2.dummy[0|0] * A[1,2,0] * tree.dummy[1] + b3.dummy[0] * B[1,0] * tree.dummy[1] + b4 * C[0,10,30] + b5 * D[60,90,120]

Note that the LAST level is always the base level in dummy coding, and that the priors refer to the first, second, etc level. By defining tree=1 if there are trees, and tree=0 if there are no trees, the second term becomes simply zero if there are no trees and becomes b2.dummy[0|0] * A[1,2,0] if there are trees. However, the utility specification above cannot be directly specified in Ngene. In the script below I show an example of how you could do it, by first defining the dummy coded variables in the model 'define' and then using interactions in model 'optimise' to achieve the utility specification above. Note that I am not sure about your priors, so you will need to set them correct, noting that the last level is the reference level. Further, the default swapping algorithm will not be able to find 32 rows without any dominant alternatives, so you will need to switch to the modified Federov algorithm.

Code: Select all
Design
;alts(define) = altA*, altB*
;alts(optimise) = altA*, altB*
;rows = 32
;block = 8
;eff=optimise(mnl,d)
;alg = mfederov
;reject:
altb.a = 0 and alta.c > 0,
altb.a = 0 and altb.c > 0,
alta.a > 0 and alta.c = 0,
altb.a > 0 and altb.c = 0

;model(define):
U(altA) = b1.dummy          * tree[1,0] ? 0=no trees (base), 1=trees
        + b2.dummy[0.1|0.2] * A[1,2,0]  ? 0=base level, 1=..., 2=...
        + b3.dummy[0.1]     * B[1,0]    ? 0=base level, 1=...
        + b4[0.1]           * C[0,10,30]
        + b5[-0.1]          * D[60,90,120](8-12,8-12,8-12)
        /
U(altB) = b1 * tree + b2 * A + b3 * B + b4 * C + b5 * D
;model(optimise):
U(altA) = b1            * tree
        + b2_1[0.1]     * A.dummy[1] * tree.dummy[1]
        + b2_2[0.2]     * A.dummy[2] * tree.dummy[1]
        + b3_1[0.1]     * B.dummy[1] * tree.dummy[1]
        + b4[0.1]       * C[0,10,30]
        + b5[-0.1]      * D[60,90,120](8-12,8-12,8-12)
        /
U(altB) = b1 * tree + b2 * A + b3 * B + b4 * C + b5 * D
$


Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm

Re: Unbalanced attribute levels

Postby polyama » Fri Aug 23, 2024 6:23 pm

Thank you very much, this is helpful.

Maksym
polyama
 
Posts: 2
Joined: Thu Aug 22, 2024 5:19 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 26 guests

cron