using eval to compare designs

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

using eval to compare designs

Postby Sumudu_Hewage » Sat Oct 28, 2023 5:52 pm

Dear moderators,

I tried comparing efficiencies of two designs using the code shown below.

Design
;alts = appA, appB, neither
;rows = 16
;block = 2
;eff = (mnl,d,mean)
;eval = Eval_1.xlsx
;model :
U(appA) =
b_training.effect [(n,-0.53152,0.22209)|(n,-0.82365,0.23732)] * TRAINING [3,2,1]
+ b_monitoring.effect [(n,0.38913,0.49741)|(n,-0.00841,0.46258)] * MONITORING [3,2,1]
+ b_HE.effect [(n,0.01499,0.23337)|(n,-0.49564,.22903)] * HE [3,2,1]
+ b_typing.effect [(n,0.34457,0.33512)|(n,-0.18257,0.31939)] * TYPING[3,2,1]
/
U(appB) =
b_training.effect * TRAINING [3,2,1]
+ b_monitoring.effect * MONITORING [3,2,1]
+ b_HE.effect * HE [3,2,1]
+ b_typing.effect * TYPING [3,2,1]
/
U(neither) = ASC_n [(n,-1.70901,0.80793)]
$

However, all efficiency parameters including the D-error are shown as undefined.
My Eval_1.xlsx file contains Resp, choice situation, and attribute-levels for appA and appB as below.
1 1 3 3 3 3 1 2 1 1
1 2 2 1 3 2 3 3 1 3
1 3 3 1 2 1 2 2 1 2
1 4 2 3 3 1 3 1 2 2
1 5 1 1 2 2 3 2 3 3
1 6 3 3 2 2 2 1 1 1
1 7 3 3 1 2 2 2 3 3
1 8 2 2 1 3 1 3 3 1
1 9 2 3 3 2 3 2 2 3
1 10 2 1 1 3 3 2 2 1
1 11 3 2 3 1 2 3 2 3
1 12 3 2 1 2 2 1 2 1
1 13 2 3 2 2 1 1 1 3
1 14 1 2 3 2 2 3 1 1
1 15 3 1 3 2 2 2 2 1
1 16 3 3 1 1 2 2 2 2

Can you please advise why it's not running as expected?

Many thanks in advance.
Sumudu
Sumudu_Hewage
 
Posts: 8
Joined: Mon Sep 18, 2023 6:54 pm

Re: using eval to compare designs

Postby Michiel Bliemer » Mon Oct 30, 2023 6:21 pm

It works fine for me, I get a Bayesian D-error of 0.28.

What I did:
1. Saved your design in an XLSX file (with a header row containing labels Resp etc, so in total 17 rows; it does not really matter what labels you use in the first row)
2. Opened the XLXS file in Ngene
3. Copied your script into a new script in Ngene
4. Run the script

See below the output that I get, which looks fine.
Note that if you want Ngene to block the design, you need to use ;block = 2, newblocking

MNL efficiency measures

Bayesian
Fixed Mean Std dev. Median Minimum Maximum
D error 0.232158 0.280997 0.034789 0.281938 0.202624 0.383304
A error 0.272145 0.342445 0.049051 0.342994 0.239498 0.512718
B estimate 45.615398 36.187403 14.593436 36.473065 4.322409 78.617189
S estimate 11599.016977 52732.133981 516425.683748 322.112242 6.75218 7179929.476565

Prior b_training(e0) b_training(e1) b_monitoring(e0) b_monitoring(e1) b_he(e0) b_he(e1) b_typing(e0) b_typing(e1)
Fixed prior value -0.53152 -0.82365 0.38913 -0.00841 0.01499 -0.49564 0.34457 -0.18257
Sp estimates 4.023322 1.790586 6.883134 11599.016977 4119.106287 3.82947 11.044698 29.16586
Sp t-ratios 0.977155 1.464733 0.747073 0.018199 0.030539 1.001583 0.589765 0.362927
Sb mean estimates 195.524187 2.624481 8294.638943 689.694829 6092.28306 44.0936 36889.540366 783.701028
Sb mean t-ratios 0.865489 1.331778 0.827686 0.673616 0.338692 0.884832 0.602013 0.521122

Design
Choice situation appa.training appa.monitoring appa.he appa.typing appb.training appb.monitoring appb.he appb.typing Block
1 3 3 3 3 1 2 1 1 0
2 2 1 3 2 3 3 1 3 0
3 3 1 2 1 2 2 1 2 0
4 2 3 3 1 3 1 2 2 0
5 1 1 2 2 3 2 3 3 0
6 3 3 2 2 2 1 1 1 0
7 3 3 1 2 2 2 3 3 0
8 2 2 1 3 1 3 3 1 0
9 2 3 3 2 3 2 2 3 0
10 2 1 1 3 3 2 2 1 0
11 3 2 3 1 2 3 2 3 0
12 3 2 1 2 2 1 2 1 0
13 2 3 2 2 1 1 1 3 0
14 1 2 3 2 2 3 1 1 0
15 3 1 3 2 2 2 2 1 0
16 3 3 1 1 2 2 2 2 0

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

Re: using eval to compare designs

Postby Sumudu_Hewage » Mon Oct 30, 2023 6:45 pm

Thank you so much, Michiel.

I did not use a header row in the xlsx file as it was advised against in the Ngene manual (page 217).
I will try again with a header row with labels.

Thanks for your time.

Best regards,
Sumudu
Sumudu_Hewage
 
Posts: 8
Joined: Mon Sep 18, 2023 6:54 pm

Re: using eval to compare designs

Postby Michiel Bliemer » Mon Oct 30, 2023 7:35 pm

That seems to be a mistake in the manual, thank you for pointing out. We will fix this.

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


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 50 guests