OOD syntax error

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

OOD syntax error

Postby Mariamishaq » Wed Jul 21, 2021 8:24 am

Hello Prof and admin members,
I am trying to run optimal orthogonal design with the following features and syntax but the D optimality shown by N gene is zero. Kindly suggest what mistake I am making and how can I rectify it. Thanking you in anticipation

Attributes and levels

Price ($/lb): $5, $7.75, $10.5, $13.25, $16 ($2.75 increments, modified to five levels)
Carbon-friendly: Yes, No label
Humanely raised: Yes, No label
Traceability: Blockchain traceable, No label

Dummies


Carbon-friendly: Yes = 1, No label =0

Humanely raised: Yes =1, No label =0

Traceability: Blockchain traceable =1, No label=0

Syntax for optimal orthogonal Design:

;alts= optA*, optB*, Neither
;rows=36
;orth=ood
;block=4
;model:
U(optA) = b1 [0] * Price[$5, $7.75, $10.5, $13.25, $16]
+ b2.dummy[0]* Carbonfriendly[1,0]
+ b3.dummy[0]* Humanelyraised[1, 0]
+ b4.dummy[0] * Traceability[1, 0] /
U(optB) = b1 * Price
+ b2 * Carbonfriendly
+ b3 * Humanelyraised
+ b4 * Traceability
$

I tried using 40 rows(4 blocks*10 choice sets) and 30 (3*10) ,still it did not work.
Best,
Mariam Ishaq
Mariamishaq
 
Posts: 7
Joined: Wed Apr 21, 2021 5:17 pm

Re: OOD syntax error

Postby Michiel Bliemer » Wed Jul 21, 2021 11:12 am

I am not entirely sure why it yields 0%, but I suspect it has to do with the specific dimensions of the orthogonal array, in particular having an attribute with 5 levels, which is not very common with orthogonal arrays.

First, note that levels should be specified as numbers, i.e. [5, 7.75, 10.5, 13.25, 16] without the dollar sign in front of it. When I run the syntax, I indeed get a 0% D-optimality (with 40 rows, since an orthogonal array with 36 rows does not exist if you have a 5-level attribute). However, the D-error is 0.0386, which is fine and indicates that you should have no issues in using this design.

If you want to create an optimal orthogonal design with 36 rows, you need to change the number of levels to 4, say [4, 8, 12, 16]. This will generate a design with 90% D-optimality and a D-error of 0.415 (noting that the D-error is slightly larger than the previous design since it only has 36 rows instead of 40 rows, but accounting for the number of rows the efficiency of this design is similiar to the previous design).

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

Re: OOD syntax error

Postby Mariamishaq » Thu Jul 22, 2021 6:04 am

Thank you so much. I really appreciate your response.

Best,
Mariam Ishaq
Mariamishaq
 
Posts: 7
Joined: Wed Apr 21, 2021 5:17 pm

Re: OOD syntax error

Postby Michiel Bliemer » Fri Jul 23, 2021 10:17 am

I had a closer look and there may actually be a bug in Ngene in computing/reporting the D-efficiency for this particular design. The OOD design that Ngene generates should be fine and have a high D-efficiency but for some reason the reported D-efficiency is 0. We are currently investigating and hope to fix the issue soon. Thank you for bringing it to our attention.

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

Re: OOD syntax error

Postby Mariamishaq » Wed Aug 11, 2021 5:23 am

Hello Professor,
I am writing this post with reference to my earlier post regarding OOD with five price levels. I had shared the model with you and wanted to know why the D optimality was coming as zero. We tried running the same model again yesterday in N gene and still it shows D optimality as zero. Could you please guide us on how to run OOD with that model. We also tried running the following model with restriction on the lowest price level. This shows error in N gene. Could you please tell us how we can modify our model to run it as an OOD.

;alts= optA*, optB*

;rows=40

;orth=ood

;block=4

;reject:

optA.Carbonfriendly = 1 and optA.Price = 5,

optB.Carbonfriendly = 1 and optB.Price = 5,

optA.Humanelyraised = 1 and optA.Price = 5,

optB.Humanelyraised = 1 and optB.Price = 5,

optA.Traceability = 1 and optA.Price = 5,

optB.Traceability = 1 and optB.Price = 5

;model:

U(optA) = b1 [0] * Price[5, 7.75, 10.5, 13.25, 16]

+ b2.dummy[0]* Carbonfriendly[1,0]

+ b3.dummy[0]* Humanelyraised[1, 0]

+ b4.dummy[0] * Traceability[1, 0] /

U(optB) = b1 * Price

+ b2 * Carbonfriendly

+ b3 * Humanelyraised

+ b4 * Traceability

$

Error: The ';reject' property requires factorial designs (';fact'), the Modified Federov algorithm (';alg=mfederov'), or the evaluate algorithm (';alg=eval').
Mariamishaq
 
Posts: 7
Joined: Wed Apr 21, 2021 5:17 pm

Re: OOD syntax error

Postby Michiel Bliemer » Wed Aug 11, 2021 7:52 am

We found a bug in the implementation, which only occurs in some cases with 5 or more levels, and only affects the reporting of D-optimality, not the generation of the design itself. The OOD design that Ngene produces is valid and is 100% optimal, so you can use that design. We are working on a new release version of Ngene and will fix this bug in that release. I cannot yet say when that version will be released as we are still working on it and will need to be extensively tested, but as said the design generated by Ngene is fine and you can use that for your study.

It is not possible to impose constraints on orthogonal designs, so you cannot use ;reject in conjunction with ;orth = ood. If constraints are important, you need to move away from orthogonal designs and use an efficient design, i.e. replace ;orth = ood with ;eff = (mnl,d). If you use reject constraints, you also need to add ;alg = mfederov, I refer to Section 8.2.2 in the Ngene manual.

Best wishes,
Michiel
Michiel Bliemer
 
Posts: 1885
Joined: Tue Mar 31, 2009 4:13 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 16 guests

cron