Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Introduction to the OPTEX Procedure

Constructing a Nonstandard Design

See OPTEXG1 in the SAS/QC Sample Library

This example shows how you can use the OPTEX procedure to construct a design for a complicated experiment for which no standard design is available.

A chemical company is designing a new reaction process. The engineers have isolated the following five factors that might affect the total yield:

Variable Description Range
RTEMPTemperature of the reaction chamber150-350 degrees
PRESSPressure of the reaction chamber10-30 psi
TIMEAmount of time for the reaction3-5 minutes
SOLVAmount of solvent used20-25 %
SOURCESource of raw materials1, 2, 3, 4, 5
While there are only two solvent levels of interest, the reaction control factors (RTEMP, PRESS, and TIME) may be curvilinearly related to the total yield and thus require three levels in the experiment. The SOURCE factor is categorical with five levels. Additionally, some combinations of the factors are known to be problematic; simultaneously setting all three reaction control factors to their lowest feasible levels will result in worthless sludge, while setting them all to their highest levels can damage the reactor. Standard experimental designs do not apply to this situation.

Creating the Candidate Set

You can use the OPTEX procedure to generate a design for this experiment. The first step in generating an optimal design is to prepare a data set containing the candidate runs (that is, the feasible factor level combinations). In many cases, this step involves the most work. You can use a variety of SAS data manipulation tools to set up the candidate data set. In this example, the candidate runs are all possible combinations of the factor levels except those with all three control factors at their low levels and at their high levels, respectively. The PLAN procedure (refer to the SAS/STAT User's Guide) provides an easy way to create a full factorial data set, which can then be subsetted using the DATA step, as shown in the following statements:

   proc plan ordered;
      factors rtemp=3 press=3 time=3 solv=2 source=5/noprint;
      output out=can
         rtemp  nvals=(150 to 350 by 100)
         press  nvals=( 10 to  30 by  10)
         time   nvals=(  3 to   5       )
         solv   nvals=( 20 to  25 by   5)
         source nvals=(  1 to   5       );
   data can; set can;
      if (^((rtemp = 150) & (press = 10) & (time = 3)));
      if (^((rtemp = 350) & (press = 30) & (time = 5)));
   proc print data=can;
   run;
A listing of the candidate data set CAN is shown in Figure 23.1.

 
Obs rtemp press time solv source
1 150 10 4 20 1
2 150 10 4 20 2
3 150 10 4 20 3
4 150 10 4 20 4
5 150 10 4 20 5
6 150 10 4 25 1
7 150 10 4 25 2
8 150 10 4 25 3
9 150 10 4 25 4
10 150 10 4 25 5
11 150 10 5 20 1
12 150 10 5 20 2
13 150 10 5 20 3
14 150 10 5 20 4
15 150 10 5 20 5
16 150 10 5 25 1
17 150 10 5 25 2
18 150 10 5 25 3
19 150 10 5 25 4
20 150 10 5 25 5
21 150 20 3 20 1
22 150 20 3 20 2
23 150 20 3 20 3
24 150 20 3 20 4
25 150 20 3 20 5
26 150 20 3 25 1
27 150 20 3 25 2
28 150 20 3 25 3
29 150 20 3 25 4
30 150 20 3 25 5
31 150 20 4 20 1
32 150 20 4 20 2
33 150 20 4 20 3
34 150 20 4 20 4
35 150 20 4 20 5
36 150 20 4 25 1
37 150 20 4 25 2
38 150 20 4 25 3
39 150 20 4 25 4
40 150 20 4 25 5
41 150 20 5 20 1
42 150 20 5 20 2
43 150 20 5 20 3
44 150 20 5 20 4
45 150 20 5 20 5
46 150 20 5 25 1
47 150 20 5 25 2
48 150 20 5 25 3
49 150 20 5 25 4
50 150 20 5 25 5
51 150 30 3 20 1
52 150 30 3 20 2
53 150 30 3 20 3
54 150 30 3 20 4
55 150 30 3 20 5
56 150 30 3 25 1
57 150 30 3 25 2
58 150 30 3 25 3
59 150 30 3 25 4
60 150 30 3 25 5
61 150 30 4 20 1
62 150 30 4 20 2
63 150 30 4 20 3
64 150 30 4 20 4
65 150 30 4 20 5
66 150 30 4 25 1
67 150 30 4 25 2
68 150 30 4 25 3
69 150 30 4 25 4
70 150 30 4 25 5
71 150 30 5 20 1
72 150 30 5 20 2
73 150 30 5 20 3
74 150 30 5 20 4
75 150 30 5 20 5
76 150 30 5 25 1
77 150 30 5 25 2
78 150 30 5 25 3
79 150 30 5 25 4
80 150 30 5 25 5
81 250 10 3 20 1
82 250 10 3 20 2
83 250 10 3 20 3
84 250 10 3 20 4
85 250 10 3 20 5
86 250 10 3 25 1
87 250 10 3 25 2
88 250 10 3 25 3
89 250 10 3 25 4
90 250 10 3 25 5
91 250 10 4 20 1
92 250 10 4 20 2
93 250 10 4 20 3
94 250 10 4 20 4
95 250 10 4 20 5
96 250 10 4 25 1
97 250 10 4 25 2
98 250 10 4 25 3
99 250 10 4 25 4
100 250 10 4 25 5
101 250 10 5 20 1
102 250 10 5 20 2
103 250 10 5 20 3
104 250 10 5 20 4
105 250 10 5 20 5
106 250 10 5 25 1
107 250 10 5 25 2
108 250 10 5 25 3
109 250 10 5 25 4
110 250 10 5 25 5
111 250 20 3 20 1
112 250 20 3 20 2
113 250 20 3 20 3
114 250 20 3 20 4
115 250 20 3 20 5
116 250 20 3 25 1
117 250 20 3 25 2
118 250 20 3 25 3
119 250 20 3 25 4
120 250 20 3 25 5
121 250 20 4 20 1
122 250 20 4 20 2
123 250 20 4 20 3
124 250 20 4 20 4
125 250 20 4 20 5
126 250 20 4 25 1
127 250 20 4 25 2
128 250 20 4 25 3
129 250 20 4 25 4
130 250 20 4 25 5
131 250 20 5 20 1
132 250 20 5 20 2
133 250 20 5 20 3
134 250 20 5 20 4
135 250 20 5 20 5
136 250 20 5 25 1
137 250 20 5 25 2
138 250 20 5 25 3
139 250 20 5 25 4
140 250 20 5 25 5
141 250 30 3 20 1
142 250 30 3 20 2
143 250 30 3 20 3
144 250 30 3 20 4
145 250 30 3 20 5
146 250 30 3 25 1
147 250 30 3 25 2
148 250 30 3 25 3
149 250 30 3 25 4
150 250 30 3 25 5
151 250 30 4 20 1
152 250 30 4 20 2
153 250 30 4 20 3
154 250 30 4 20 4
155 250 30 4 20 5
156 250 30 4 25 1
157 250 30 4 25 2
158 250 30 4 25 3
159 250 30 4 25 4
160 250 30 4 25 5
161 250 30 5 20 1
162 250 30 5 20 2
163 250 30 5 20 3
164 250 30 5 20 4
165 250 30 5 20 5
166 250 30 5 25 1
167 250 30 5 25 2
168 250 30 5 25 3
169 250 30 5 25 4
170 250 30 5 25 5
171 350 10 3 20 1
172 350 10 3 20 2
173 350 10 3 20 3
174 350 10 3 20 4
175 350 10 3 20 5
176 350 10 3 25 1
177 350 10 3 25 2
178 350 10 3 25 3
179 350 10 3 25 4
180 350 10 3 25 5
181 350 10 4 20 1
182 350 10 4 20 2
183 350 10 4 20 3
184 350 10 4 20 4
185 350 10 4 20 5
186 350 10 4 25 1
187 350 10 4 25 2
188 350 10 4 25 3
189 350 10 4 25 4
190 350 10 4 25 5
191 350 10 5 20 1
192 350 10 5 20 2
193 350 10 5 20 3
194 350 10 5 20 4
195 350 10 5 20 5
196 350 10 5 25 1
197 350 10 5 25 2
198 350 10 5 25 3
199 350 10 5 25 4
200 350 10 5 25 5
201 350 20 3 20 1
202 350 20 3 20 2
203 350 20 3 20 3
204 350 20 3 20 4
205 350 20 3 20 5
206 350 20 3 25 1
207 350 20 3 25 2
208 350 20 3 25 3
209 350 20 3 25 4
210 350 20 3 25 5
211 350 20 4 20 1
212 350 20 4 20 2
213 350 20 4 20 3
214 350 20 4 20 4
215 350 20 4 20 5
216 350 20 4 25 1
217 350 20 4 25 2
218 350 20 4 25 3
219 350 20 4 25 4
220 350 20 4 25 5
221 350 20 5 20 1
222 350 20 5 20 2
223 350 20 5 20 3
224 350 20 5 20 4
225 350 20 5 20 5
226 350 20 5 25 1
227 350 20 5 25 2
228 350 20 5 25 3
229 350 20 5 25 4
230 350 20 5 25 5
231 350 30 3 20 1
232 350 30 3 20 2
233 350 30 3 20 3
234 350 30 3 20 4
235 350 30 3 20 5
236 350 30 3 25 1
237 350 30 3 25 2
238 350 30 3 25 3
239 350 30 3 25 4
240 350 30 3 25 5
241 350 30 4 20 1
242 350 30 4 20 2
243 350 30 4 20 3
244 350 30 4 20 4
245 350 30 4 20 5
246 350 30 4 25 1
247 350 30 4 25 2
248 350 30 4 25 3
249 350 30 4 25 4
250 350 30 4 25 5
Figure 23.1: Candidate Set of Runs for Chemical Reaction Design

Generating the Design

The next step is to invoke the OPTEX procedure, specifying the candidate data set as the input data set. You must also provide a model for the experiment, using the MODEL statement, which uses the linear modeling syntax of the GLM procedure (refer to the SAS/STAT User's Guide). Since SOURCE is a classification factor, you need to specify it in a CLASS statement. To detect possible cross-product effects in the other factors, as well as the quadratic effects of the three reaction control factors, you can use a modified response surface model, as shown in the following statements:
   proc optex data=can;
      class source;
      model source solv|rtemp|press|time@@2
            rtemp*rtemp press*press time*time;
   run;
Note that the MODEL statement does not involve a response variable (unlike the MODEL statement in the GLM procedure).

The default number of runs for a design is assumed by the OPTEX procedure to be 10 plus the number of parameters (a total of 10 + 18 = 28 in this case.) Thus, the procedure searches for 28 runs among the candidates in CAN that allow D-optimal estimation of the effects in the model. (See "Optimality Criteria" for a precise definition of D-optimality.) Randomness is built into the search algorithm to overcome the problem of local optima, so by default the OPTEX procedure takes 10 random "tries" to find the best design. The output, shown in Figure 23.2, lists efficiency factors for the 10 designs found. These designs are all very close in terms of their D-efficiency.

 
The OPTEX Procedure

Design Number D-Efficiency A-Efficiency G-Efficiency Average Prediction
Standard Error
1 43.6131 22.9676 77.5794 0.8529
2 43.5647 24.8096 77.5054 0.8495
3 43.3119 24.1106 77.8534 0.8494
4 43.0918 23.6364 78.4918 0.8535
5 42.7266 23.5430 75.1467 0.8608
6 42.6481 22.8901 75.6073 0.8669
7 42.5349 22.3007 76.1047 0.8683
8 42.4867 20.7428 77.2003 0.8689
9 42.4342 24.1507 75.5005 0.8562
10 42.1579 20.8750 71.0905 0.8839
Figure 23.2: Efficiency Factors for Chemical Reaction Design

The final step is to save the best design in a data set. You can do this interactively by submitting the OUTPUT statement immediately after the preceding statements. Then use the PRINT procedure to list the design. The design is listed in Figure 23.3.

     output out=reactor;
   proc print data=reactor;
   run;

 
Obs solv rtemp press time source
1 20 150 10 4 5
2 20 150 30 3 5
3 20 350 20 5 5
4 25 250 20 4 5
5 25 350 30 3 5
6 20 150 20 3 4
7 20 250 30 5 4
8 20 350 10 3 4
9 25 150 10 5 4
10 25 150 30 3 4
11 25 350 20 4 4
12 20 150 20 5 3
13 20 150 30 4 3
14 20 350 30 3 3
15 25 150 20 3 3
16 25 250 10 3 3
17 25 250 30 5 3
18 25 350 10 5 3
19 20 250 10 5 2
20 20 350 30 4 2
21 25 150 30 5 2
22 25 350 10 3 2
23 25 350 20 5 2
24 20 150 30 5 1
25 20 250 20 3 1
26 20 350 10 4 1
27 25 150 10 4 1
28 25 350 30 3 1
Figure 23.3: Optimal Design for Chemical Reaction Process Experiment

Customizing the Number of Runs

The OPTEX procedure provides options with which you can customize many aspects of the design optimization process. Suppose the budget for this experiment can only accommodate 25 runs. You can use the N= option in the GENERATE statement to request a design with this number of runs.

   proc optex data=can;
      class source;
      model source solv|rtemp|press|time@@2
            rtemp*rtemp press*press time*time;
      generate n=25;
   run;

Including Specific Runs

If there are factor combinations that you want to include in the final design, you can use the OPTEX procedure to augment those combinations optimally. For example, suppose you want to force four specific factor combinations to be in the design. If these combinations are saved in a data set, you can force them into the design by specifying the data set with the AUGMENT= option in the GENERATE statement. This technique is demonstrated in the following statements:
   data preset;
      input solv rtemp press time source;
      datalines;
   20 350 10 5 4
   20 150 10 4 3
   25 150 30 3 3
   25 250 10 5 3
   ;
   proc optex data=can;
      class source;
      model source solv|rtemp|press|time@@2
            rtemp*rtemp press*press time*time;
      generate n=25 augment=preset;
      output out=reactor2;
   run;
The final design is listed in Figure 23.4. Note that the points in the AUGMENT= data set appear as observations 7, 11, 15, and 16.

Using an Alternative Search Technique

You can also specify a variety of optimization methods with the GENERATE statement. The default method is relatively fast; while other methods may find better designs, they take longer to run and the improvement is usually only marginal. The method that generally finds the best designs is the modified Fedorov procedure described by Cook and Nachtsheim (1980). The following statements show how to request this method:
   proc optex data=can;
      class source;
      model source solv|rtemp|press|time@@2
            rtemp*rtemp press*press time*time;
      generate n=25 method=m_fedorov;
   run;

 
Obs solv rtemp press time source
1 20 150 30 3 5
2 20 350 20 5 5
3 25 150 10 4 5
4 25 250 20 4 5
5 25 350 30 3 5
6 20 150 20 5 4
7 20 250 10 3 4
8 25 150 10 5 4
9 25 150 30 3 4
10 25 350 30 4 4
11 20 150 20 3 3
12 20 250 10 5 3
13 20 350 30 4 3
14 25 150 30 5 3
15 25 350 10 3 3
16 20 150 10 4 2
17 20 250 30 5 2
18 20 350 10 3 2
19 25 250 20 4 2
20 25 350 10 5 2
21 20 150 30 5 1
22 20 350 10 4 1
23 20 350 30 3 1
24 25 150 20 3 1
25 25 250 30 5 1
Figure 23.4: Augmented Design for Chemical Reaction Process Experiment

The efficiencies for the resulting designs are shown in Figure 23.5.

 
The OPTEX Procedure

Design Number D-Efficiency A-Efficiency G-Efficiency Average Prediction
Standard Error
1 43.2463 21.5586 76.0488 0.9174
2 43.1226 21.7105 73.4776 0.9171
3 43.1226 21.7105 73.4776 0.9171
4 43.0155 24.7451 73.7483 0.9091
5 42.9533 24.6489 75.3329 0.8977
6 42.8604 23.0747 72.6984 0.9114
7 42.7463 24.8328 78.7114 0.8951
8 42.6978 22.1083 74.1844 0.9219
9 42.6714 21.6200 74.9443 0.9255
10 42.4603 21.6074 74.4040 0.9186
Figure 23.5: Efficiency Factors for the Modified Fedorov Search

In this case, the modified Fedorov procedure takes three to four times longer than the default method, and D-efficiency only improves by about 0.5%. On the other hand, the longer search method may take only a few seconds on a reasonably fast computer.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.