Candidateset and invalid designs

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

Candidateset and invalid designs

Postby Ann » Thu Jun 13, 2024 10:44 pm

Hi!
I created 4 syntax files each containing a different combination utility functions for different alternatives (one syntax file is presented in the following). Overall, there are 7 alternatives and each of these 6 syntax files contains 6 alternatives. Priors are from a pilot study.

Design
? D-Efficient MNL
;alts = A, B, C, D, E, F
;con
;rows = 80
;eff = (mnl, d)

;Cond:

if(A.a1 <=25, D.d2 <=15),
if(A.a1 <=25, C.c2 <=15),
if(A.a1 <=25, B.b2 <=19),
if(A.a1 <=25, F.f2 <=27),
if(A.a1 <=25, E.e2 <=25),

if(A.a1 >25, D.d2 >15),
if(A.a1 >25, C.c2 >15),
if(A.a1 >25, B.b2 >19),
if(A.a1 >25, F.f2 >27),
if(A.a1 >25, E.e2 >25),

if(F.f2 <=19, F.f1 <4),
if(B.b2<=19, B.1 <4),

if(D.d2<= 24, D.d1 <= 2),
if(C.c2 <= 24, C.c1 <= 5),
if(D.d2 <> C.c2, D.d2 = C.c2)


;model:
U(F) = b0_F[0.88]
+ b_f1[-0.2] * f1[2.5, 3, 4, 6]
+ b_f2[-0.05] * f2[5, 10, 19, 27, 35, 50, 55]
+ b_f3[-0.05] * f3[2, 5, 7, 13]
+ b_f4[-0.05] * f4[0, 2, 4, 8, 12]
+ b_f5.dummy[-0.05 | -0.05] * f5[0, 1, 2]
+ b_f6.dummy[-0.05 | -0.05 | -0.05] * f6[0, 1, 2, 3] /

U(E) = b0_E[0.05]
+ b_e1[-0.05] * e1[1, 1.5, 2, 3]
+ b_e2[-0.05] * e2[6, 15, 25, 38, 45] /

U(D) =
b_d1-0.07] * d1[0.5, 1.5, 2, 3, 5]
+ b_d2[-0.04] * d2[6, 9, 15, 24, 32, 45]
+ b_d3[-0.06] * d3[0, 2, 5, 10] /


U(C) = b0_C[0.05]
+ b_c1[-0.05] * c1[1, 3, 5, 7]
+ b_c2[-0.05] * c2[6, 9, 15, 24, 32, 45] /

U(A) = b0_A[1.61]
+b0a1[-0.09] * a1[6, 15, 25, 38, 45] /

U(B) = b0_B[1.17]
+ b_b1[-0.23] * b1[2.5, 3, 4, 6]
+ b_b2[-0.04] * b2[5, 10, 19, 27, 35, 50]
+ b_b3[0.11] * b3[4, 8, 12, 16, 20]
+ b_b4.dummy[-0.05 | -0.05] * b4[0, 1, 2]
+ b_b5[-0.05] * b5[5, 10, 30, 60]
$


I created 80 rows per syntax file, so taht I had 80 x 4 = 320 choice situations in total. I used these 320 choice situations to create a candidateset. Cells that did not belong to an alternative (which are the ones that belong to the 7th alternative not included in one of the syntax files), were coded as 999. Then, I uploaded this candidateset in a new final syntax file that contains all 7 alternatives. I added 999 to all alternatives, except for the alternatives F, E, D as they are always present.

Design
? D-Efficient MNL
;alts = A, B, C, D, E, F

;rows = 16
;block = 4
;eff = (mnl,d)
;alg = mfederov(candidates = Candidateset.xlsx)


;model:
U(F) = b0_F[0.88]
+ b_f1[-0.2] * f1[2.5, 3, 4, 6]
+ b_f2[-0.05] * f2[5, 10, 19, 27, 35, 50, 55]
+ b_f3[-0.05] * f3[2, 5, 7, 13]
+ b_f4[-0.05] * f4[0, 2, 4, 8, 12]
+ b_f5.dummy[-0.05 | -0.05] * f5[0, 1, 2]
+ b_f6.dummy[-0.05 | -0.05 | -0.05] * f6[0, 1, 2, 3] /

U(E) = b0_E[0.05]
+ b_e1[-0.05] * e1[1, 1.5, 2, 3]
+ b_e2[-0.05] * e2[6, 15, 25, 38, 45] /

U(D) =
b_d1-0.07] * d1[0.5, 1.5, 2, 3, 5]
+ b_d2[-0.04] * d2[6, 9, 15, 24, 32, 45]
+ b_d3[-0.06] * d3[0, 2, 5, 10] /


U(C) = b0_C[0.05]
+ b_c1[-0.05] * c1[1, 3, 5, 7, 999]
+ b_c2[-0.05] * c2[6, 9, 15, 24, 32, 45, 999] /

U(A) = b0_A[1.61]
+b0a1[-0.09] * a1[6, 15, 25, 38, 45, 999] /

U(B) = b0_B[1.17]
+ b_b1[-0.23] * b1[2.5, 3, 4, 6, 999]
+ b_b2[-0.04] * b2[5, 10, 19, 27, 35, 50, 999]
+ b_b3[0.11] * b3[4, 8, 12, 16, 20, 999]0
+ b_b4.dummy[-0.05 | -0.05| -0.05] * b4[0, 1, 2, 999]
+ b_b5[-0.05] * b5[5, 10, 30, 60, 999]

U(G) = b0_G[1.72]
+ b_g1[-0.07] * g1[30, 35, 45, 60, 90, 120, 999]

$

However, whenever I run the file, the current designs are all invalid. Only one design has an undefined D-error. Also, I am unsure what to do with the "999-method" whnen it comes to the dummy coded variables. May you help me please?
Ann
 
Posts: 2
Joined: Thu Jun 13, 2024 6:23 pm

Re: Candidateset and invalid designs

Postby Michiel Bliemer » Fri Jun 14, 2024 8:17 am

You should NOT use 999 for dummy coded variables. As explained in the Ngene manual, giving only one numerical variable in each alternative a level of 999 is sufficient to let it drop out of the choice set. So you can remove 999 from the dummy variable as you cannot estimate a coefficient for this level and this leads to an Undefined D-error. See if the above resolves the issue.

Also carefully check your scripts as you have several mistakes, such as:
if(B.b2<=19, B.1 <4) ? should be B.b1
b_d1-0.07] * d1[0.5, 1.5, 2, 3, 5] ? should be b_d1[-0.07]
+ b_b3[0.11] * b3[4, 8, 12, 16, 20, 999]0 ? 0 should not be there at the end

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

Re: Candidateset and invalid designs

Postby Ann » Fri Jun 14, 2024 4:28 pm

Thanks a lot Michiel!

I corrected all mistakes and also, I left out the 999 for the dummy coded variables. However, the problem still remains. After having run the code, there is only one design with an undefined D-error und a very large number of invalid designs.

May you help me again?
Ann
 
Posts: 2
Joined: Thu Jun 13, 2024 6:23 pm

Re: Candidateset and invalid designs

Postby Michiel Bliemer » Sat Jun 15, 2024 8:41 am

I have responded to you by private message. The issue with the candidate set was that you still used 999 for a dummy coded variable. Setting it in the candidate set to the base level (or any other level of that attribute) fixes the issue.

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


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 6 guests

cron