Code check
Posted: Thu Sep 21, 2023 7:21 pm
Hi,
I am creating an orthogonal fractional factorial design with five alternatives, using the following code:
I have some questions about this design:
1. Is my code correct?
2. Is there a way to improve my code? The current design results in a D-error of 0.54 and an A-error of 0.71.
3. The constants a_location and a_route are of importance, and therefore I added ;con to the code. Is this correct?
Also, I know that b1-b9 should have positive values. So I could also use an efficient design. The manual states that the sign of a parameter can be indicated in an efficient design. I cannot, however, figure out how to specify a lower bound only for b1-b9 in the code below.
Could you please help me with this?
Thank you in advance!
I am creating an orthogonal fractional factorial design with five alternatives, using the following code:
- Code: Select all
?
Simultaneous orthogonal fractional factorial design
Design
;alts = location1, location2, route1, route2, none
;rows = 20
;orth = sim
;block = 2
;con
;model:
U(location1) = a_location + b1 * x1[0,1] + b2 * x2[0,1] + b3 * x3[0,1] + b4 * x4[0,1] + b5 * x5[0,1] /
U(location2) = a_location + b1 * x1 + b2 * x2 + b3 * x3 + b4 * x4 + b5 * x5 /
U(route1) = a_route + b6 * x6[0,1] + b7 * x7[0,1] + b8 * x8[0,1] + b9 * x9[0,1] /
U(route2) = a_route + b6 * x6 + b7 * x7 + b8 * x8 + b9 * x9
$
I have some questions about this design:
1. Is my code correct?
2. Is there a way to improve my code? The current design results in a D-error of 0.54 and an A-error of 0.71.
3. The constants a_location and a_route are of importance, and therefore I added ;con to the code. Is this correct?
Also, I know that b1-b9 should have positive values. So I could also use an efficient design. The manual states that the sign of a parameter can be indicated in an efficient design. I cannot, however, figure out how to specify a lower bound only for b1-b9 in the code below.
- Code: Select all
? Efficient design
Design
;alts = location1, location2, route1, route2, none
;rows = 20
;eff = (mnl, d)
;block = 2
;con
;model:
U(location1) = a_location + b1 * x1[0,1] + b2 * x2[0,1] + b3 * x3[0,1] + b4 * x4[0,1] + b5 * x5[0,1] /
U(location2) = a_location + b1 * x1 + b2 * x2 + b3 * x3 + b4 * x4 + b5 * x5 /
U(route1) = a_route + b6 * x6[0,1] + b7 * x7[0,1] + b8 * x8[0,1] + b9 * x9[0,1] /
U(route2) = a_route + b6 * x6 + b7 * x7 + b8 * x8 + b9 * x9
$
Could you please help me with this?
Thank you in advance!