status quo with fixed levels

This forum is for posts covering broader stated choice experimental design issues.

Moderators: Andrew Collins, Michiel Bliemer, johnr

status quo with fixed levels

Postby JuDoe123 » Tue May 27, 2025 3:58 am

Dear ChoiceMetrics team,
I’m designing a choice experiment on protection infrastructures against nature hazards. It is a d-efficient design, with unlabelled alternatives and constraints on protection infrastructure and cost attributes. I have 6 attributes: 5 categorical ones [biodiversity (biodiv), recreation (recrea), natural resource use (NRuse), risk, infrastructure] and 1 continuous (price).
Here are specificities regarding my three alternatives:
- alt1 and alt2:
o all levels are possible for biodiv, recrea, NRuse
o risk must have level 1
o infrastructure must have either level 1,2 or 3
- alt3
o all levels are fixed such as
o biodiv must have level 2
o recrea must have level 0
o NRuse must have level 0
o risk must have level 0
o infrastructure must have level 0
Despite multiple attempts, going through the manual and the forum posts, I’m stuck with errors and would appreciate your guidance.
Here is what I tried and the issues I encountered:
- I set the levels of alt3 as constants, but of course, the constants are viewed as additional attributes and not as levels of the given attributes
- alt3 has the same utility function as alt1 and alt2, but I added restrictions with “reject”. I get the error message “The ';reject' property contains an attribute that does not exist in the design. '[2,1]’”. If I want to exclude several levels for an attribute, do I have to write the restriction for each level separately?
- (Code below) when I set the level to a specific number for alt3, I get the error message “Two identically named attributes do not have consistently specified levels: 'alt3.biodiv', 'alt1.biodiv'”

Code: Select all
Design
alts = alt1*, alt2*, alt3;
rows = 48;
block = 4;
eff = (mnl,d);
;model:
u(alt1) = b1.dummy[0|0]*biodiv[2,1,0] + b2.dummy[0|0]*recrea[2,1,0] + b3.dummy[0|0]*NRuse[2,1,0] + b4.dummy[0|0]*infrastructure[3,2,1] + b5*risk[1] + b6*price[25,50,100,150,200,400] /
u(alt2) = b1.dummy[0|0]*biodiv[2,1,0] + b2.dummy[0|0]*recrea[2,1,0] + b3.dummy[0|0]*NRuse[2,1,0] + b4.dummy[0|0]*infrastructure[3,2,1] + b5*risk[1] + b6*price[25,50,100,150,200,400] /
u(alt3) = b1*biodiv[2]       + b2*recrea[0]       + b3*NRuse[0]       + b4*infrastructure[0]       + b5*risk[0] + b6*price[0]

;cond:
if(alt2.infrastructure = 3, alt2.price = [150,200,400]),
if(alt1.infrastructure = 3, alt1.price = [150,200,400]),
if(alt2.infrastructure = 1, alt2.price = [25,50,100,150,200]),
if(alt1.infrastructure = 1, alt1.price = [25,50,100,150,200]),
if(alt2.price = 25, alt1.price=[25,50,100,150,200]),
if(alt1.price = 25, alt2.price=[25,50,100,150,200])
$


Any guidance on the way forward to make it work would be greatly appreciated!

Best regards,
Julie
JuDoe123
 
Posts: 1
Joined: Thu May 22, 2025 7:46 pm

Re: status quo with fixed levels

Postby Michiel Bliemer » Tue Jun 03, 2025 2:19 am

Several things to note:

* Since risk=1 for alt1/2 and risk=0 for alt3, this attribute is confounded with the alternative and therefore captured in an alternative-specific constant (b0) for alt3.
* Since infrastructure=0 only appears in alt3, it is confounded with the alternative and therefore captured in the same alternative-specific constant (b0) for alt3.

When dummy coding, the reference level (the last level in Ngene) has utility 0. So by setting the last level to the level used for alt3, one can simply omit it from the utility function as it is simply 0.
If you want to set a numerical attribute to a different level for alt3, you need to give it a different attribute name, e.g. price_SQ.

The script below runs.

Code: Select all
design
;alts = alt1*, alt2*, alt3
;rows = 48
;block = 4
;eff = (mnl,d)
;model:
u(alt1) = b1.dummy[0|0] * biodiv[0,1,2] ? 2 is now the reference level
        + b2.dummy[0|0] * recrea[2,1,0]
        + b3.dummy[0|0] * NRuse[2,1,0]
        + b4.dummy[0|0] * infrastructure[3,2,1]
        + b5            * price[25,50,100,150,200,400]
        /
u(alt2) = b1.dummy      * biodiv
        + b2.dummy      * recrea
        + b3.dummy      * NRuse
        + b4.dummy      * infrastructure
        + b5            * price
        /
u(alt3) = b0            ? captures risk=0 and infrastructure=0
        ? biodiv=2, which is simply 0 because it is the reference level
        ? recrea=0, which is simply 0 because it is the reference level
        ? NRuse=0, which is simply 0 because it is the reference level
        + b5            * price_SQ[0]

;cond:
if(alt2.infrastructure = 3, alt2.price = [150,200,400]),
if(alt1.infrastructure = 3, alt1.price = [150,200,400]),
if(alt2.infrastructure = 1, alt2.price = [25,50,100,150,200]),
if(alt1.infrastructure = 1, alt1.price = [25,50,100,150,200]),
if(alt2.price = 25, alt1.price=[25,50,100,150,200]),
if(alt1.price = 25, alt2.price=[25,50,100,150,200])
$


You can also consider using the modified Federov algorithm. Note that this algorithm does not satisfy attribute level balance, so you may want to impose from attribute level frequency constraints (or simply dummy code the price attribute during the design stage).

Code: Select all
design
;alts = alt1*, alt2*, alt3
;rows = 48
;block = 4
;eff = (mnl,d)

;alg = mfederov

;require:
alt3.biodiv = 2,
alt3.recrea = 0,
alt3.NRuse = 0

;reject:
alt1.infrastructure = 3 and alt1.price < 150, alt2.infrastructure = 3 and alt2.price < 150,
alt1.infrastructure = 1 and alt1.price > 200, alt2.infrastructure = 1 and alt2.price > 200,
alt1.price = 25 and alt2.price = 400, alt2.price = 25 and alt1.price = 400

;model:
u(alt1) = b1.dummy[0|0] * biodiv[2,1,0]
        + b2.dummy[0|0] * recrea[2,1,0]
        + b3.dummy[0|0] * NRuse[2,1,0]
        + b4.dummy[0|0] * infrastructure[3,2,1]
        + b5            * price[25,50,100,150,200,400]
        /
u(alt2) = b1.dummy      * biodiv
        + b2.dummy      * recrea
        + b3.dummy      * NRuse
        + b4.dummy      * infrastructure
        + b5            * price
        /
u(alt3) = b0            ? captures risk=0 and infrastructure=0
        + b1.dummy      * biodiv
        + b2.dummy      * recrea
        + b3.dummy      * NRuse
        + b4.dummy      * infrastructure
        + b5            * price_SQ[0]
$


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


Return to General questions about choice experiments

Who is online

Users browsing this forum: No registered users and 0 guests