D optimality of zero after small change to code
Posted: 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
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