Efficient Design to Encounter Two-Way Interactions
Posted:
Wed Jul 24, 2024 1:22 am
by acanakci
Hello,
I am encountering an error when I run the following syntax:
Design
;alts = alt1, alt2
;rows = 168
;block = 21
;eff = (mnl,d)
;model:
U(alt1) = b0[1]
+ b1[1] * A[0,1]
+ b2[-1] * B[0,1]
+ b3[1] * C[0,1,2,3]
+ b4[-1] * D[0,1,2]
+ b5[1] * E[0,1,2]
+ b6[1] * F[0,1]
+ b7[1] * G[40,80,120,160]
+ b8[1] * H[0,1,2,3,4]
+ b9[1] * I[20,40,60]
// Two-way interactions with prior values
+ b10[-1] * A[0,1] * B[0,1]
+ b11[1] * A[0,1] * C[0,1,2,3]
+ b12[-1] * A[0,1] * D[0,1,2]
+ b13[1] * A[0,1] * E[0,1,2]
+ b14[1] * A[0,1] * F[0,1]
+ b15[1] * A[0,1] * G[40,80,120,160]
+ b16[1] * A[0,1] * H[0,1,2,3,4]
+ b17[1] * A[0,1] * I[20,40,60]
+ b18[-1] * B[0,1] * C[0,1,2,3]
+ b19[1] * B[0,1] * D[0,1,2]
+ b20[-1] * B[0,1] * E[0,1,2]
+ b21[-1] * B[0,1] * F[0,1]
+ b22[-1] * B[0,1] * G[40,80,120,160]
+ b23[-1] * B[0,1] * H[0,1,2,3,4]
+ b24[-1] * B[0,1] * I[20,40,60]
+ b25[-1] * C[0,1,2,3] * D[0,1,2]
+ b26[1] * C[0,1,2,3] * E[0,1,2]
+ b27[1] * C[0,1,2,3] * F[0,1]
+ b28[1] * C[0,1,2,3] * G[40,80,120,160]
+ b29[1] * C[0,1,2,3] * H[0,1,2,3,4]
+ b30[1] * C[0,1,2,3] * I[20,40,60]
+ b31[-1] * D[0,1,2] * E[0,1,2]
+ b32[-1] * D[0,1,2] * F[0,1]
+ b33[-1] * D[0,1,2] * G[40,80,120,160]
+ b34[-1] * D[0,1,2] * H[0,1,2,3,4]
+ b35[-1] * D[0,1,2] * I[20,40,60]
+ b36[1] * E[0,1,2] * F[0,1]
+ b37[1] * E[0,1,2] * G[40,80,120,160]
+ b38[1] * E[0,1,2] * H[0,1,2,3,4]
+ b39[1] * E[0,1,2] * I[20,40,60]
+ b40[1] * F[0,1] * G[40,80,120,160]
+ b41[1] * F[0,1] * H[0,1,2,3,4]
+ b42[1] * F[0,1] * I[20,40,60]
+ b43[1] * G[40,80,120,160] * H[0,1,2,3,4]
+ b44[1] * G[40,80,120,160] * I[20,40,60]
+ b45[1] * H[0,1,2,3,4] * I[20,40,60]
/
U(alt2) = b1 * A
+ b2 * B
+ b3 * C
+ b4 * D
+ b5 * E
+ b6 * F
+ b7 * G
+ b8 * H
+ b9 * I
// Two-way interactions with prior values
+ b10 * A * B
+ b11 * A * C
+ b12 * A * D
+ b13 * A * E
+ b14 * A * F
+ b15 * A * G
+ b16 * A * H
+ b17 * A * I
+ b18 * B * C
+ b19 * B * D
+ b20 * B * E
+ b21 * B * F
+ b22 * B * G
+ b23 * B * H
+ b24 * B * I
+ b25 * C * D
+ b26 * C * E
+ b27 * C * F
+ b28 * C * G
+ b29 * C * H
+ b30 * C * I
+ b31 * D * E
+ b32 * D * F
+ b33 * D * G
+ b34 * D * H
+ b35 * D * I
+ b36 * E * F
+ b37 * E * G
+ b38 * E * H
+ b39 * E * I
+ b40 * F * G
+ b41 * F * H
+ b42 * F * I
+ b43 * G * H
+ b44 * G * I
+ b45 * H * I
$
The error I encounter is: Warning: No valid design has been found after 10 minutes. If no designs have been evaluated (see the counter below), this may be because a single design is taking a very long time to evaluate. If invalid designs are reported below, there may be a problem with the specification of the design. A common problem is that the choice probabilities are too extreme (close to 1 and 0), perhaps because some or all of the prior values are too large. Also, it is generally a good idea to start with a simple design (MNL, non-Bayesian), then add complexity. If you press stop, a design will be reported, which may assist in diagnosing the problem.
Could the problem be related to the following facts:
1- I do not assign each level of an attribute a different prior parameter; rather, I assign, e.g., attribute A with coefficient 1. There are examples in the manual in which prior parameters are represented with normal distribution. I am not sure if I need to follow a similar logic.
2- All of my attributes are not categorical but I think I treat them as categorical as I am not sure how to differentiate between them while writing the syntax.
Your help would be greatly appreciated.
Thank you very much!
Beyza
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Wed Jul 24, 2024 6:42 am
by Michiel Bliemer
The issue is that your priors do not make sense. A prior value of 1 is clearly not appropriate when the attribute levels are very large, such as 40, 80, 120, 160. This results in an infinite D-error because all choice probabilities become either 0 or 1. You should either provide reasonable priors, preferably from a pilot study, or use uninformative priors equal to 0 or close to 0, e.g. 0.00001.
Note that \\ is not the correct symbol for comments, please use a question mark for comments, e.g.
? this is a comment
For any categorical variables, you will need to use dummy coding when generating an efficient design. For example:
b4.dummy[-0.01|-0.02] * D[1,2,0] ? the last level is the base level
To create interactions with dummy coded variables, you will need something like:
i1 * G * D.dummy[1] + i2 * G * D.dummy[2]
For interactions between dummy coded variables, you will need:
i1 * D.dummy[1] * E.dummy[1] + i2 * D.dummy[1] * E.dummy[2] + i3 * D.dummy[2] * E.dummy[1] + i4 * D.dummy[2] * E.dummy[2]
In other words, for categorical variables you will need to make interactions between individual levels. This will significantly increase the number of parameters in your model, far beyond the number of parameters that you will be able to estimate in your model. So perhaps think carefully if you need all interaction terms as the model has a huge number of parameters and in model estimation most of them will not be statistically significant or even meaningful.
Michiel
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Wed Jul 24, 2024 7:34 pm
by acanakci
Thank you very much!
May I also ask how we would represent the continuous variables and their interactions with each other and with the categoric variables?
Also, the example syntax for orthogonal fractional factorial design and efficient design that are provided in the manual are as follows:
1 - Orthogonal fractional factorial design: Considering our discussion, I wonder why we do not have an interaction term for each attribute level but have x1*x2, directly.
? use of interactions specified in the model
Design
;alts = alt1, alt2, alt3
;rows = 8
;orth = sim
;model:
U(alt1) = b01 + b1 * x1[0,1] + b2 * x2[0,1] + b3 * x1 * x2 /
U(alt2) = b02 + b1 * x1 + b2 * x2 /
U(alt3) = b1 * x1 + b2 * x2 $
2- Efficient design: Considering our discussion, I wonder why we do not specify the attributes as dummy (like
b4.dummy[-0.01|-0.02] * D[1,2,0]).
Design
;alts = alt1, alt2
;rows = 12
;eff = (mnl,d)
;model:
U(alt1) = b1[-0.2] + b2[1.2] * A[0,1,2] + b3[2.5] * B[0,1] /
U(alt2) = b2 * A + b4[1.1] * C[2,4,6,8]
$
Beyza
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Thu Jul 25, 2024 11:55 pm
by acanakci
Hello,
With the following syntax for the orthogonal fractional factorial design:
Design
;alts = alt1, alt2
;rows = 180
;orth = ood
;block = 20
;model:
U(alt1) = b01 + b1 * ToolSupply[0,1] + b2 * Weather[0,1] + b3 * Traffic[0,1,2] + b4 * Insurance[0,1,2] + b5 * Locker[0,1] + b6 * WorkingHours[0,1,2,3,4] +
b7 * BikeLines[0,1,2] + b8 * CompPerPackage[0,1,2,3] + b9 * CompPerKM[0,1,2] +
i1 * ToolSupply[1] * Weather[1] +
i2 * ToolSupply[1] * Traffic[1] + i3 * ToolSupply[1] * Traffic[2] +
i4 * ToolSupply[1] * Insurance[1] + i5 * ToolSupply[1] * Insurance[2] +
i6 * ToolSupply[1] * Locker[1] +
i7 * ToolSupply[1] * WorkingHours[1] + i8 * ToolSupply[1] * WorkingHours[2] + i9 * ToolSupply[1] * WorkingHours[3] + i10 * ToolSupply[1] * WorkingHours[4] +
i11 * ToolSupply[1] * BikeLines[2] +
i12 * ToolSupply[1] * CompPerPackage[3] + i13 * ToolSupply[1] * CompPerKM[2] +
i14 * Weather[1] * Traffic[1] + i15 * Weather[1] * Traffic[2] +
i16 * Weather[1] * Insurance[1] + i17 * Weather[1] * Insurance[2] +
i18 * Weather[1] * Locker[1] +
i19 * Weather[1] * WorkingHours[1] + i20 * Weather[1] * WorkingHours[2] + i21 * Weather[1] * WorkingHours[3] + i22 * Weather[1] * WorkingHours[4] +
i23 * Weather[1] * BikeLines[2] +
i24 * Weather[1] * CompPerPackage[3] + i25 * Weather[1] * CompPerKM[2] +
i26 * Traffic[1] * Insurance[1] + i27 * Traffic[1] * Insurance[2] + i28 * Traffic[2] * Insurance[1] + i29 * Traffic[2] * Insurance[2] +
i30 * Traffic[1] * Locker[1] + i31 * Traffic[2] * Locker[1] +
i32 * Traffic[1] * WorkingHours[1] + i33 * Traffic[1] * WorkingHours[2] + i34 * Traffic[1] * WorkingHours[3] + i35 * Traffic[1] * WorkingHours[4] +
i36 * Traffic[2] * WorkingHours[1] + i37 * Traffic[2] * WorkingHours[2] + i38 * Traffic[2] * WorkingHours[3] + i39 * Traffic[2] * WorkingHours[4] +
i40 * Traffic[1] * BikeLines[2] + i41 * Traffic[2] * BikeLines[2] +
i42 * Traffic[1] * CompPerPackage[3] + i43 * Traffic[1] * CompPerKM[2] + i44 * Traffic[2] * CompPerPackage[3] + i45 * Traffic[2] * CompPerKM[2] +
i46 * Insurance[1] * Locker[1] + i47 * Insurance[2] * Locker[1] +
i48 * Insurance[1] * WorkingHours[1] + i49 * Insurance[1] * WorkingHours[2] + i50 * Insurance[1] * WorkingHours[3] + i51 * Insurance[1] * WorkingHours[4] +
i52 * Insurance[2] * WorkingHours[1] + i53 * Insurance[2] * WorkingHours[2] + i54 * Insurance[2] * WorkingHours[3] + i55 * Insurance[2] * WorkingHours[4] +
i56 * Insurance[1] * BikeLines[2] + i57 * Insurance[2] * BikeLines[2] +
i58 * Insurance[1] * CompPerPackage[3] + i59 * Insurance[1] * CompPerKM[2] + i60 * Insurance[2] * CompPerPackage[3] + i61 * Insurance[2] * CompPerKM[2] +
i62 * Locker[1] * WorkingHours[1] + i63 * Locker[1] * WorkingHours[2] + i64 * Locker[1] * WorkingHours[3] + i65 * Locker[1] * WorkingHours[4] +
i66 * Locker[1] * BikeLines[2] +
i67 * Locker[1] * CompPerPackage[3] + i68 * Locker[1] * CompPerKM[2] +
i69 * WorkingHours[1] * BikeLines[2] + i70 * WorkingHours[2] * BikeLines[2] + i71 * WorkingHours[3] * BikeLines[2] + i72 * WorkingHours[4] * BikeLines[2] +
i73 * WorkingHours[1] * CompPerPackage[3] + i74 * WorkingHours[1] * CompPerKM[2] + i75 * WorkingHours[2] * CompPerPackage[3] + i76 * WorkingHours[2] * CompPerKM[2] +
i77 * WorkingHours[3] * CompPerPackage[3] + i78 * WorkingHours[3] * CompPerKM[2] + i79 * WorkingHours[4] * CompPerPackage[3] + i80 * WorkingHours[4] * CompPerKM[2] +
i81 * BikeLines[2] * CompPerPackage[3] + i82 * BikeLines[2] * CompPerKM[2] $
U(alt2) = b1 * ToolSupply + b2 * Weather + b3 * Traffic + b4 * Insurance + b5 * Locker + b6 * WorkingHours +
b7 * BikeLines + b8 * CompPerPackage + b9 * CompPerKM +
i1 * ToolSupply[1] * Weather[1] +
i2 * ToolSupply[1] * Traffic[1] + i3 * ToolSupply[1] * Traffic[2] +
i4 * ToolSupply[1] * Insurance[1] + i5 * ToolSupply[1] * Insurance[2] +
i6 * ToolSupply[1] * Locker[1] +
i7 * ToolSupply[1] * WorkingHours[1] + i8 * ToolSupply[1] * WorkingHours[2] + i9 * ToolSupply[1] * WorkingHours[3] + i10 * ToolSupply[1] * WorkingHours[4] +
i11 * ToolSupply[1] * BikeLines[2] +
i12 * ToolSupply[1] * CompPerPackage[3] + i13 * ToolSupply[1] * CompPerKM[2] +
i14 * Weather[1] * Traffic[1] + i15 * Weather[1] * Traffic[2] +
i16 * Weather[1] * Insurance[1] + i17 * Weather[1] * Insurance[2] +
i18 * Weather[1] * Locker[1] +
i19 * Weather[1] * WorkingHours[1] + i20 * Weather[1] * WorkingHours[2] + i21 * Weather[1] * WorkingHours[3] + i22 * Weather[1] * WorkingHours[4] +
i23 * Weather[1] * BikeLines[2] +
i24 * Weather[1] * CompPerPackage[3] + i25 * Weather[1] * CompPerKM[2] +
i26 * Traffic[1] * Insurance[1] + i27 * Traffic[1] * Insurance[2] + i28 * Traffic[2] * Insurance[1] + i29 * Traffic[2] * Insurance[2] +
i30 * Traffic[1] * Locker[1] + i31 * Traffic[2] * Locker[1] +
i32 * Traffic[1] * WorkingHours[1] + i33 * Traffic[1] * WorkingHours[2] + i34 * Traffic[1] * WorkingHours[3] + i35 * Traffic[1] * WorkingHours[4] +
i36 * Traffic[2] * WorkingHours[1] + i37 * Traffic[2] * WorkingHours[2] + i38 * Traffic[2] * WorkingHours[3] + i39 * Traffic[2] * WorkingHours[4] +
i40 * Traffic[1] * BikeLines[2] + i41 * Traffic[2] * BikeLines[2] +
i42 * Traffic[1] * CompPerPackage[3] + i43 * Traffic[1] * CompPerKM[2] + i44 * Traffic[2] * CompPerPackage[3] + i45 * Traffic[2] * CompPerKM[2] +
i46 * Insurance[1] * Locker[1] + i47 * Insurance[2] * Locker[1] +
i48 * Insurance[1] * WorkingHours[1] + i49 * Insurance[1] * WorkingHours[2] + i50 * Insurance[1] * WorkingHours[3] + i51 * Insurance[1] * WorkingHours[4] +
i52 * Insurance[2] * WorkingHours[1] + i53 * Insurance[2] * WorkingHours[2] + i54 * Insurance[2] * WorkingHours[3] + i55 * Insurance[2] * WorkingHours[4] +
i56 * Insurance[1] * BikeLines[2] + i57 * Insurance[2] * BikeLines[2] +
i58 * Insurance[1] * CompPerPackage[3] + i59 * Insurance[1] * CompPerKM[2] + i60 * Insurance[2] * CompPerPackage[3] + i61 * Insurance[2] * CompPerKM[2] +
i62 * Locker[1] * WorkingHours[1] + i63 * Locker[1] * WorkingHours[2] + i64 * Locker[1] * WorkingHours[3] + i65 * Locker[1] * WorkingHours[4] +
i66 * Locker[1] * BikeLines[2] +
i67 * Locker[1] * CompPerPackage[3] + i68 * Locker[1] * CompPerKM[2] +
i69 * WorkingHours[1] * BikeLines[2] + i70 * WorkingHours[2] * BikeLines[2] + i71 * WorkingHours[3] * BikeLines[2] + i72 * WorkingHours[4] * BikeLines[2] +
i73 * WorkingHours[1] * CompPerPackage[3] + i74 * WorkingHours[1] * CompPerKM[2] + i75 * WorkingHours[2] * CompPerPackage[3] + i76 * WorkingHours[2] * CompPerKM[2] +
i77 * WorkingHours[3] * CompPerPackage[3] + i78 * WorkingHours[3] * CompPerKM[2] + i79 * WorkingHours[4] * CompPerPackage[3] + i80 * WorkingHours[4] * CompPerKM[2] +
i81 * BikeLines[2] * CompPerPackage[3] + i82 * BikeLines[2] * CompPerKM[2] $
I get an error as Error in Command 1: Two identically named attributes do not have consistently specified levels: 'alt1.toolsupply', 'alt1.toolsupply'.
With the following syntax for the d-efficient design:
Design
;alts = alt1, alt2
;rows = 180
;eff = (mnl,d)
;block = 20
;model:
U(alt1) = b01 + b1.dummy[0.00001|0.00001] * ToolSupply[1,2,0] + b2.dummy[-0.00001] * Weather[1,0] + b3.dummy[-0.00001|0.00001] * Traffic[1,2,0] +
b4.dummy[0.00001|0.00001] * Insurance[1,2,0] + b5.dummy[0.00001] * Locker[1,0] + b6.dummy[0.00001|0.00001|0.00001|0.00001] * WorkingHours[1,2,3,4,0] +
b7 * BikeLines[0:1] + b8 * CompPerPackage[40:160] + b9 * CompPerKM[20:60] +
i1 * ToolSupply.dummy[1] * Weather.dummy[1] +
i2 * ToolSupply.dummy[1] * Traffic.dummy[1] + i3 * ToolSupply.dummy[1] * Traffic.dummy[2] +
i4 * ToolSupply.dummy[1] * Insurance.dummy[1] + i5 * ToolSupply.dummy[1] * Insurance.dummy[2] +
i6 * ToolSupply.dummy[1] * Locker.dummy[1] +
i7 * ToolSupply.dummy[1] * WorkingHours.dummy[1] + i8 * ToolSupply.dummy[1] * WorkingHours.dummy[2] + i9 * ToolSupply.dummy[1] * WorkingHours.dummy[3] + i10 * ToolSupply.dummy[1] * WorkingHours.dummy[4] +
i11 * ToolSupply.dummy[1] * BikeLines[1] +
i12 * ToolSupply.dummy[1] * CompPerPackage + i13 * ToolSupply.dummy[1] * CompPerKM +
i14 * Weather.dummy[1] * Traffic.dummy[1] + i15 * Weather.dummy[1] * Traffic.dummy[2] +
i16 * Weather.dummy[1] * Insurance.dummy[1] + i17 * Weather.dummy[1] * Insurance.dummy[2] +
i18 * Weather.dummy[1] * Locker.dummy[1] +
i19 * Weather.dummy[1] * WorkingHours.dummy[1] + i20 * Weather.dummy[1] * WorkingHours.dummy[2] + i21 * Weather.dummy[1] * WorkingHours.dummy[3] + i22 * Weather.dummy[1] * WorkingHours.dummy[4] +
i23 * Weather.dummy[1] * BikeLines[1] +
i24 * Weather.dummy[1] * CompPerPackage + i25 * Weather.dummy[1] * CompPerKM +
i26 * Traffic.dummy[1] * Insurance.dummy[1] + i27 * Traffic.dummy[1] * Insurance.dummy[2] + i28 * Traffic.dummy[2] * Insurance.dummy[1] + i29 * Traffic.dummy[2] * Insurance.dummy[2] +
i30 * Traffic.dummy[1] * Locker.dummy[1] + i31 * Traffic.dummy[2] * Locker.dummy[1] +
i32 * Traffic.dummy[1] * WorkingHours.dummy[1] + i33 * Traffic.dummy[1] * WorkingHours.dummy[2] + i34 * Traffic.dummy[1] * WorkingHours.dummy[3] + i35 * Traffic.dummy[1] * WorkingHours.dummy[4] +
i36 * Traffic.dummy[2] * WorkingHours.dummy[1] + i37 * Traffic.dummy[2] * WorkingHours.dummy[2] + i38 * Traffic.dummy[2] * WorkingHours.dummy[3] + i39 * Traffic.dummy[2] * WorkingHours.dummy[4] +
i40 * Traffic.dummy[1] * BikeLines[1] + i41 * Traffic.dummy[2] * BikeLines[1] +
i42 * Traffic.dummy[1] * CompPerPackage + i43 * Traffic.dummy[1] * CompPerKM + i44 * Traffic.dummy[2] * CompPerPackage + i45 * Traffic.dummy[2] * CompPerKM +
i46 * Insurance.dummy[1] * Locker.dummy[1] + i47 * Insurance.dummy[2] * Locker.dummy[1] +
i48 * Insurance.dummy[1] * WorkingHours.dummy[1] + i49 * Insurance.dummy[1] * WorkingHours.dummy[2] + i50 * Insurance.dummy[1] * WorkingHours.dummy[3] + i51 * Insurance.dummy[1] * WorkingHours.dummy[4] +
i52 * Insurance.dummy[2] * WorkingHours.dummy[1] + i53 * Insurance.dummy[2] * WorkingHours.dummy[2] + i54 * Insurance.dummy[2] * WorkingHours.dummy[3] + i55 * Insurance.dummy[2] * WorkingHours.dummy[4] +
i56 * Insurance.dummy[1] * BikeLines[1] + i57 * Insurance.dummy[2] * BikeLines[1] +
i58 * Insurance.dummy[1] * CompPerPackage + i59 * Insurance.dummy[1] * CompPerKM + i60 * Insurance.dummy[2] * CompPerPackage + i61 * Insurance.dummy[2] * CompPerKM +
i62 * Locker.dummy[1] * WorkingHours.dummy[1] + i63 * Locker.dummy[1] * WorkingHours.dummy[2] + i64 * Locker.dummy[1] * WorkingHours.dummy[3] + i65 * Locker.dummy[1] * WorkingHours.dummy[4] +
i66 * Locker.dummy[1] * BikeLines[1] +
i67 * Locker.dummy[1] * CompPerPackage + i68 * Locker.dummy[1] * CompPerKM +
i69 * WorkingHours.dummy[1] * BikeLines[1] + i70 * WorkingHours.dummy[2] * BikeLines[1] + i71 * WorkingHours.dummy[3] * BikeLines[1] + i72 * WorkingHours.dummy[4] * BikeLines[1] +
i73 * WorkingHours.dummy[1] * CompPerPackage + i74 * WorkingHours.dummy[1] * CompPerKM + i75 * WorkingHours.dummy[2] * CompPerPackage + i76 * WorkingHours.dummy[2] * CompPerKM +
i77 * WorkingHours.dummy[3] * CompPerPackage + i78 * WorkingHours.dummy[3] * CompPerKM + i79 * WorkingHours.dummy[4] * CompPerPackage + i80 * WorkingHours.dummy[4] * CompPerKM +
i81 * BikeLines[1] * CompPerPackage + i82 * BikeLines[1] * CompPerKM $
U(alt2) = b1.dummy[0.00001|0.00001] * ToolSupply[1,2,0] + b2.dummy[-0.00001] * Weather[1,0] + b3.dummy[-0.00001|0.00001] * Traffic[1,2,0] +
b4.dummy[0.00001|0.00001] * Insurance[1,2,0] + b5.dummy[0.00001] * Locker[1,0] + b6.dummy[0.00001|0.00001|0.00001|0.00001] * WorkingHours[1,2,3,4,0] +
b7 * BikeLines[0:1] + b8 * CompPerPackage[40:160] + b9 * CompPerKM[20:60] +
i1 * ToolSupply.dummy[1] * Weather.dummy[1] +
i2 * ToolSupply.dummy[1] * Traffic.dummy[1] + i3 * ToolSupply.dummy[1] * Traffic.dummy[2] +
i4 * ToolSupply.dummy[1] * Insurance.dummy[1] + i5 * ToolSupply.dummy[1] * Insurance.dummy[2] +
i6 * ToolSupply.dummy[1] * Locker.dummy[1] +
i7 * ToolSupply.dummy[1] * WorkingHours.dummy[1] + i8 * ToolSupply.dummy[1] * WorkingHours.dummy[2] + i9 * ToolSupply.dummy[1] * WorkingHours.dummy[3] + i10 * ToolSupply.dummy[1] * WorkingHours.dummy[4] +
i11 * ToolSupply.dummy[1] * BikeLines[1] +
i12 * ToolSupply.dummy[1] * CompPerPackage + i13 * ToolSupply.dummy[1] * CompPerKM +
i14 * Weather.dummy[1] * Traffic.dummy[1] + i15 * Weather.dummy[1] * Traffic.dummy[2] +
i16 * Weather.dummy[1] * Insurance.dummy[1] + i17 * Weather.dummy[1] * Insurance.dummy[2] +
i18 * Weather.dummy[1] * Locker.dummy[1] +
i19 * Weather.dummy[1] * WorkingHours.dummy[1] + i20 * Weather.dummy[1] * WorkingHours.dummy[2] + i21 * Weather.dummy[1] * WorkingHours.dummy[3] + i22 * Weather.dummy[1] * WorkingHours.dummy[4] +
i23 * Weather.dummy[1] * BikeLines[1] +
i24 * Weather.dummy[1] * CompPerPackage + i25 * Weather.dummy[1] * CompPerKM +
i26 * Traffic.dummy[1] * Insurance.dummy[1] + i27 * Traffic.dummy[1] * Insurance.dummy[2] + i28 * Traffic.dummy[2] * Insurance.dummy[1] + i29 * Traffic.dummy[2] * Insurance.dummy[2] +
i30 * Traffic.dummy[1] * Locker.dummy[1] + i31 * Traffic.dummy[2] * Locker.dummy[1] +
i32 * Traffic.dummy[1] * WorkingHours.dummy[1] + i33 * Traffic.dummy[1] * WorkingHours.dummy[2] + i34 * Traffic.dummy[1] * WorkingHours.dummy[3] + i35 * Traffic.dummy[1] * WorkingHours.dummy[4] +
i36 * Traffic.dummy[2] * WorkingHours.dummy[1] + i37 * Traffic.dummy[2] * WorkingHours.dummy[2] + i38 * Traffic.dummy[2] * WorkingHours.dummy[3] + i39 * Traffic.dummy[2] * WorkingHours.dummy[4] +
i40 * Traffic.dummy[1] * BikeLines[1] + i41 * Traffic.dummy[2] * BikeLines[1] +
i42 * Traffic.dummy[1] * CompPerPackage + i43 * Traffic.dummy[1] * CompPerKM + i44 * Traffic.dummy[2] * CompPerPackage + i45 * Traffic.dummy[2] * CompPerKM +
i46 * Insurance.dummy[1] * Locker.dummy[1] + i47 * Insurance.dummy[2] * Locker.dummy[1] +
i48 * Insurance.dummy[1] * WorkingHours.dummy[1] + i49 * Insurance.dummy[1] * WorkingHours.dummy[2] + i50 * Insurance.dummy[1] * WorkingHours.dummy[3] + i51 * Insurance.dummy[1] * WorkingHours.dummy[4] +
i52 * Insurance.dummy[2] * WorkingHours.dummy[1] + i53 * Insurance.dummy[2] * WorkingHours.dummy[2] + i54 * Insurance.dummy[2] * WorkingHours.dummy[3] + i55 * Insurance.dummy[2] * WorkingHours.dummy[4] +
i56 * Insurance.dummy[1] * BikeLines[1] + i57 * Insurance.dummy[2] * BikeLines[1] +
i58 * Insurance.dummy[1] * CompPerPackage + i59 * Insurance.dummy[1] * CompPerKM + i60 * Insurance.dummy[2] * CompPerPackage + i61 * Insurance.dummy[2] * CompPerKM +
i62 * Locker.dummy[1] * WorkingHours.dummy[1] + i63 * Locker.dummy[1] * WorkingHours.dummy[2] + i64 * Locker.dummy[1] * WorkingHours.dummy[3] + i65 * Locker.dummy[1] * WorkingHours.dummy[4] +
i66 * Locker.dummy[1] * BikeLines[1] +
i67 * Locker.dummy[1] * CompPerPackage + i68 * Locker.dummy[1] * CompPerKM +
i69 * WorkingHours.dummy[1] * BikeLines[1] + i70 * WorkingHours.dummy[2] * BikeLines[1] + i71 * WorkingHours.dummy[3] * BikeLines[1] + i72 * WorkingHours.dummy[4] * BikeLines[1] +
i73 * WorkingHours.dummy[1] * CompPerPackage + i74 * WorkingHours.dummy[1] * CompPerKM + i75 * WorkingHours.dummy[2] * CompPerPackage + i76 * WorkingHours.dummy[2] * CompPerKM +
i77 * WorkingHours.dummy[3] * CompPerPackage + i78 * WorkingHours.dummy[3] * CompPerKM + i79 * WorkingHours.dummy[4] * CompPerPackage + i80 * WorkingHours.dummy[4] * CompPerKM +
i81 * BikeLines[1] * CompPerPackage + i82 * BikeLines[1] * CompPerKM $
I get an error as Error in Command 1: Two identically named attributes do not have consistently specified levels: 'alt1.bikelines', 'alt1.bikelines'. But the source of these errors are not visible to me, could they be rooted in another problem? As a note, I did not use continuous variables for the orthogonal fractional factorial design, but used for the d-efficient design.
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Fri Jul 26, 2024 9:53 pm
by acanakci
Thank you very much!
I still get varying errors. Could you please provide me with an example syntax for the following attributes?
Safety Equipment Tool Supply: Categorical (0,1)
Average Proportion of Bike Lines on the Route: Continuous (0, 1/3, 2/3, 1)
Compensation per Package: Continuous (40, 80, 120, 160)
Working Hours: Categorical (0, 1, 2, 3, 4)
I need the example syntax for:
Orthogonal fractional factorial design with one-way and two-way interactions
Efficient design with one-way and two-way interactions
Considering our discussions and the manual, I am a bit confused. A detailed example would greatly help clarify my understanding.
Thank you very much for your assistance and time.
Beyza
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Mon Jul 29, 2024 9:34 am
by Michiel Bliemer
The Ngene manual, as well as posts on this forum, provide many examples, so please have a look at them.
Main effects in your case:
b1.dummy[0] * safety[1,0] ? 0 = base level
b2[0] * bikelines[0,0.33,0.67,1]
b3[0] * compensation[40,80,120,160]
b4.dummy[0|0|0] * hours[1,2,3,0] ? 0 = base level
Some interaction effects:
i1[0] * bikelines * safety.dummy[1]
i2[0] * bikelines * compensation
i3 * compensation * hours.dummy[1] + i4 * compensation * hours.dummy[2] + i5 * compensation * hours.dummy[3]
Michiel
Re: Efficient Design to Encounter Two-Way Interactions
Posted:
Tue Jul 30, 2024 1:06 am
by acanakci
Thank you!
I followed your suggestions and things get more clear.
I just wonder if we cannot use continuous variables in an orthogonal fractional factorial design? When I write the utility function with the continuous variables, I get the following error: Error: Use of continuous variables requires the use of the ';eff' property.
Here is the syntax I am using:
Design
;alts = Alt1, Alt2
;rows = 180
;orth = ood
;block = 20
;model:
U(Alt1) = b1.dummy[0.00001] * ToolSupply[0,1] + b2.dummy[0.00001] * Weather[0,1] + b3.dummy[0.00001|0.00001] * Traffic[0,1,2] +
b4.dummy[0.00001|0.00001] * Insurance[0,1,2] + b5.dummy[0.00001] * Locker[0,1] + b6.dummy[0.00001|0.00001|0.00001|0.00001] * WorkingHours[0,1,2,3,4] +
b7[0.00001] * BikeLines[0:1] + b8[0.00001] * CompPerPackage[40:160] + b9[0.00001] * CompPerKM[20:60] /
U(Alt2) = b1 * ToolSupply + b2 * Weather + b3 * Traffic + b4 * Insurance + b5 * Locker + b6 * WorkingHours +
b7 * BikeLines + b8 * CompPerPackage + b9 * CompPerKM +
$
Beyza