Page 1 of 1

Review a design with priors

PostPosted: Tue Jul 18, 2023 10:05 pm
by zmesic
Dear Moderators,
I'm beginner in Ngene and involved in project „Willigness to pay for omega 3 enriched eggs“. After the pilot, my colleague analyzed the data in STATA and calculated the priors. However, I do not get a design when I run the code with this priors.

Attributes and levels:
TYPE OF PRODUCTION: 3=organic, 2=free-range, 1=cage-fr:e, 0=cage
OM: 0=not omega, 1=omega
Price – 7 levels

Design
;alts = alt1*, alt2*,none
;rows = 24
;block = 3
;eff = (mnl,d)
;model:
U(alt1) = b1[0.36]*OM[0,1] + b2.dummy[2.04|2.43|1.69]*TYPE[3,2,1,0] +b3[-0.28]*PRICE[1.7,2.2,2.7,3.2,3.7,4.2,4.7,5.3] /
U(alt2) = b1*OM + b2*TYPE +b3*PRICE
$

This is the message I'm getting after I run the code.

Note: Defaulting to assigning blocks with the 'minsum' method.

A valid initial random design could not be generated after approximately 10 seconds. In this time, of the 372799 attempts made, there were 0 row repetitions, 11369 alternative repetitions, and 361430 cases of dominance. There are a number of possible causes for this, including the specification of too many constraints, not having enough attributes or attribute levels for the number of rows required, and the use of too many scenario attributes. A design may yet be found, and the search will continue for 10 minutes. Alternatively, you can stop the run and alter the syntax.

Re: Review a design with priors

PostPosted: Wed Jul 19, 2023 10:34 am
by Michiel Bliemer
Hi,

As the warning message indicates, there are a lot of choice tasks with dominant alternatives in your design and the default swapping algorithm cannot find a design without any dominant alternatives. You need to switch to the modified Federov algorithm, see script below. This algorithm does not guarantee attribute level balance, so I added level constraints for the numerical attributes in the script below. Dummy coded attributes will typically have a high degree of level balance because otherwise the D-error will go up.

One other thing: You need to add a constant because your opt-out is a labelled alternative. You need to estimate this constant in STATA and put it where I wrote XXX in the script.

Code: Select all
Design
;alts = alt1*, alt2*,none
;rows = 24
;block = 3
;alg = mfederov
;eff = (mnl,d)
;model:
U(alt1) = b0[XXX]
        + b1[0.36]                  * OM[0,1](10-14,10-14)
        + b2.dummy[2.04|2.43|1.69]  * TYPE[3,2,1,0]
        + b3[-0.28]                 * PRICE[1.7,2.2,2.7,3.2,3.7,4.2,4.7,5.3](2-4,2-4,2-4,2-4,2-4,2-4,2-4,2-4)
        /
U(alt2) = b1*OM + b2*TYPE +b3*PRICE
$




Michiel

Re: Review a design with priors

PostPosted: Wed Jul 19, 2023 7:25 pm
by zmesic
Dear Michael,
thank you very much for the detailed answer. You helped me a lot.

Re: Review a design with priors

PostPosted: Thu Jul 20, 2023 10:29 am
by Michiel Bliemer
Oh I forgot to mention to also add the constant b0 in alt2, so please add it in there as well.

Michiel