D optimality of zero after small change to code

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

D optimality of zero after small change to code

Postby Richard Norman » Thu Jan 14, 2021 2:39 pm

Hi,

I noticed something I couldn't explain when running code, and hoped I could get some collective advice on it. I ran the following code to generate a d-efficient design:

Design
;alts = alt1, alt2
;rows = 120
;eff = (mnl,d)
;block = 10

;model:
U(alt1) = b1.dummy[-0.03|-0.02|-0.01] * A[3,2,1,0] + b2.dummy[0] * B[1,0] + b3.dummy[0] * C[1,0] + b4.dummy[0.02|0.01] * D[2,1,0] + b5.dummy[0.02|0.01] * E[2,1,0] + b6.dummy[0|0|0] * F[3,2,1,0]/
U(alt2) = b1.dummy * A[3,2,1,0] + b2.dummy * B[1,0] + b3.dummy * C[1,0] + b4.dummy * D[2,1,0] + b5.dummy * E[2,1,0] + b6.dummy * F[3,2,1,0]$

This appeared to run fine, and I got a reasonably high D optimality score very quickly.

But, then I tweaked the code to add a level to two of the variables:

Design
;alts = alt1, alt2
;rows = 120
;eff = (mnl,d)
;block = 10

;model:
U(alt1) = b1.dummy[-0.04|-0.03|-0.02|-0.01] * A[4,3,2,1,0] + b2.dummy[0] * B[1,0] + b3.dummy[0] * C[1,0] + b4.dummy[0.02|0.01] * D[2,1,0] + b5.dummy[0.02|0.01] * E[2,1,0] + b6.dummy[0|0|0|0] * F[4,3,2,1,0]/
U(alt2) = b1.dummy * A[4,3,2,1,0] + b2.dummy * B[1,0] + b3.dummy * C[1,0] + b4.dummy * D[2,1,0] + b5.dummy * E[2,1,0] + b6.dummy * F[4,3,2,1,0]$

Again, this appears to run well and the D-error drops as expected. But the D optimality stays at 0% irrespective of how long I let it run.

I hope I am not doing something stupid, but could anyone explain why this happens?

Thanks,
Richard
Richard Norman
 
Posts: 5
Joined: Wed Jul 22, 2015 12:18 pm

Re: D optimality of zero after small change to code

Postby Michiel Bliemer » Thu Jan 14, 2021 4:43 pm

D-optimality is defined for optimal orthogonal designs using the equations in the work of Street and Burgess. Such designs are generated when using ;orth = ood.

When using efficient designs, e.g., ;eff = (mnl,d), and having non-zero priors, you you need to look at D-errors because D-optimality is not well-defined, i.e. it cannot handle non-zero priors and it requires an orthogonal design to do the calculations. Note that there exist hardly any orthogonal designs with 5-levels (your attribute F), so this may be one of the reasons. You can check by changing ;eff = (mnl,d) into ;orth = ood. For the first syntax, Ngene is able to find a design, but for the second syntax no orthogonal design exists.

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

Re: D optimality of zero after small change to code

Postby Richard Norman » Thu Jan 14, 2021 5:39 pm

Thank you Michiel, that's very clear. I really appreciate your prompt and helpful reply.
Richard Norman
 
Posts: 5
Joined: Wed Jul 22, 2015 12:18 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 11 guests