How to Make Orthogonal Array

This forum is for posts that specifically focus on Ngene.

Moderators: Andrew Collins, Michiel Bliemer, johnr

How to Make Orthogonal Array

Postby CMA » Mon Dec 20, 2021 5:19 pm

I am unable to create a 7 attribute 4 level orthogonal array in Ngene.
I usually create a table with two choices, so I don't know how to create a table with only one choice, like a orthogonal array.
I write ";alts = alt1*, alt2*" to specify the choices, but if I delete "alt2*", I get an error.
This will be the syntax you are going to try.
Please let me know if you have any solutions.
Code: Select all
Design
;alts = alt1*
;rows = 100
;block=10
;orth = sim
;model:
U(alt1) = b1 * A[0,1,2,3] + b2 * B[0,1,2,3] + b3 * C[0,1,2,3] + b4 * D[0,1,2,3] +b5 * E[0,1,2,3] + b6 * F[0,1,2,3] + b7 * G[0,1,2,3] /
$
CMA
 
Posts: 34
Joined: Mon Jun 14, 2021 3:42 pm

Re: How to Make Orthogonal Array

Postby Michiel Bliemer » Mon Dec 20, 2021 7:41 pm

For choice models you always need to specify at least 2 alternatives. However, the second alternative can be an opt-out alternative, which has no attributes and has zero utility. In Ngene, you can simply omit the utility function of the opt-out alternative as in the syntax below.

Note that there does not exist an orthogonal array of 100 rows if all your attributes have four levels, there only exists an orthogonal array with 112 rows. It is not possible to block this orthogonal array in 10 orthogonal blocks but you can consider blocking it in 7 or 14 near-orthogonal blocks.

The code below generates the orthogonal array of 112 rows without blocking.

Code: Select all
Design
;alts = alt1, none
;rows = 112
;orth = sim
;model:
U(alt1) = b1 * A[0,1,2,3] + b2 * B[0,1,2,3] + b3 * C[0,1,2,3] + b4 * D[0,1,2,3] +b5 * E[0,1,2,3] + b6 * F[0,1,2,3] + b7 * G[0,1,2,3]
$


The code below creates an orthogonal array with 112 rows with a near-orthogonal blocking column, where each block contains 14 choice tasks. You can also choose ;block = 7, but 112 needs to be divisible by the number of blocks so you cannot just choose any number.

Code: Select all
Design
;alts = alt1, none
;rows = 112
;block = 14
;orth = seq2
;model:
U(alt1) = b1 * A[0,1,2,3] + b2 * B[0,1,2,3] + b3 * C[0,1,2,3] + b4 * D[0,1,2,3] +b5 * E[0,1,2,3] + b6 * F[0,1,2,3] + b7 * G[0,1,2,3]
$


IMPORTANT: I strongly suggest that you use the recently released Ngene version 1.3 to generate this design. Ngene 1.3 has important improvements in generating orthogonal arrays and version 1.2.x may not be able to generate these designs.

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

Re: How to Make Orthogonal Array

Postby CMA » Thu Dec 23, 2021 3:24 pm

Thank you very much for your detailed answer.
I was able to create the orthogonal array I wanted to create successfully.
Thank you very much.
CMA
 
Posts: 34
Joined: Mon Jun 14, 2021 3:42 pm

Re: How to Make Orthogonal Array

Postby CMA » Mon Oct 03, 2022 11:41 am

I have an additional question.
I created an orthogonal array, but I got a warning.
Warning: Defaulting to prior values of zero for the following priors: 'b1, b2, b3, b4, b5, b6, b7'
Warning: One or more attributes will not have level balance with the number of rows specified: alt1.a, alt1.b, alt1.c, alt1.d, alt1.e, alt1.f, alt1.g

Code: Select all
Design
;alts = alt1, none
;rows = 142
;orth = sim
;model:
U(alt1) = b1 * A[0,1,2,3,4] + b2 * B[0,1,2,3,4] + b3 * C[0,1,2,3,4] + b4 * D[0,1,2,3,4] + b5 * E[0,1,2,3,4] + b6 * F[0,1,2] + b7 * G[0,1,2]
$

What is the problem?
I hope you can resolve this issue.
CMA
 
Posts: 34
Joined: Mon Jun 14, 2021 3:42 pm

Re: How to Make Orthogonal Array

Postby Michiel Bliemer » Mon Oct 03, 2022 3:32 pm

Warnings are not a major issue, only Errors are.

The first warning simply states that you did not specify priors for the parameters. Priors are not needed for orthogonal designs and Ngene simply defaults them to zero for efficiency calculations. This does not impact the generation of the orthogonal design.

The second warning refers to your number of rows, 142. Since you have attributes with 5 and 3 levels, you will only achieve attribute level balance if this number is divisible by 3 and 5. Clearly it is not divisible by 5. However, Ngene automatically increases the number of rows to achieve attribute level balance so this not a real issue.

Note that an orthogonal design with five 5-level attributes and two 3-level attributes does not exist, so Ngene will not be able to create an orthogonal design. If you really want an orthogonal design then you will need to change the number of levels of the attributes. Instead of creating an orthogonal design, I would recommend a D-efficient design with zero priors. In that case, you can replace ;orth = sim with ;eff = (mnl,d). In that case, if you require attribute level balance, please change 142 to a number that is divisible by 3 and 5.

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

Re: How to Make Orthogonal Array

Postby CMA » Mon Oct 03, 2022 4:22 pm

Thanks for your prompt response.
I understand that I cannot create a orthogonal design with five 5-level attributes and two 3-level attributes.
I would like to consider other ways to create them.
Also, when I do a 5-attribute 5-level or 5-attribute 6-level orthogonal design, the one created by Ngene and R (Package(FrF2 or DoE.base)) is slightly different, which could be the cause?
Or is it something that can be ignored?
Thank you in advance.
CMA
 
Posts: 34
Joined: Mon Jun 14, 2021 3:42 pm

Re: How to Make Orthogonal Array

Postby Michiel Bliemer » Tue Oct 04, 2022 4:08 pm

If an orthogonal array exists for given design dimensions, then it is often not unique. You can use any orthogonal design that you wish.
You can also choose to pick the most efficient orthogonal design, for example by combining:

;orth = sim
;eff = (mnl,d)

In that case, Ngene searches through all possible orthogonal designs and selects the most efficient one. Otherwise, it simply returns the first one it finds.

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

Re: How to Make Orthogonal Array

Postby CMA » Wed Oct 05, 2022 11:08 am

Thank you for all your help.
I have learned a great deal.
CMA
 
Posts: 34
Joined: Mon Jun 14, 2021 3:42 pm


Return to Choice experiments - Ngene

Who is online

Users browsing this forum: No registered users and 3 guests