Chapter Contents Previous Next
 Details of the OPTEX Procedure

## Example 24.8: Optimal Design with Fixed Covariates

 See OPTEX9 in the SAS/QC Sample Library

In addition to finding optimal block designs, you can use the BLOCKS statement to find designs that are optimal with respect to more general covariate models. You can specify the data set containing the covariates with the DESIGN= option in the BLOCKS statement. Covariate models are specified in the same way as the treatment model.

The following example is based on an example in Harville (1974). Suppose you want a design for five qualitative treatments in 10 runs. The value of a covariate thought to be related to the response has been recorded for each of the experimental units. For instance, if the treatments are different types of animal feed, a typical covariate might be the initial weight of each animal. In the following, the data sets COV and TMT are created, containing the covariate values and the candidate treatment levels, respectively. Then the OPTEX procedure is invoked with a simple one-way model for the treatment effect and a quadratic model for the covariate effect.

```   data cov; input u @@@@; datalines;
.46 .54 .58 .60 .73 .77 .82 .84 .89 .95
;
data tmt;
do t = 1 to 5;
output;
end;
proc optex data=tmt seed=17364
coding=orthcan;
class t;
model t;
blocks design=cov;
model u u*u;
output out=tmtu;
proc print data=tmtu;
run;
```
In this case, the CODING=ORTHCAN option in the PROC OPTEX statement has the same effect as CODING=ORTH, which is to produce orthogonal coding with respect to the candidates. Note that
• the CLASS and MODEL statements that define the treatment model precede the BLOCKS statement
• the MODEL statement that defines the covariate model follows the BLOCKS statement
As a general rule, CLASS and MODEL statements that come before a BLOCKS statement are interpreted as applying to the treatment model, while CLASS and MODEL statements that come after a BLOCKS statement involving the DESIGN= blocks-specification are interpreted as applying to the covariate model.

The listing of the efficiency values for the 10 designs found is shown in Output 24.8.1. Note that the efficiencies are the same for all tries. A listing of the design is shown in Output 24.8.2.

Output 24.8.1: Optimal Treatment Efficiency Factors with a Quadratic Covariate Effect

 The OPTEX Procedure

 Design Number TreatmentD-Efficiency TreatmentA-Efficiency 1 91.6621 91.1336 2 91.6621 91.1336 3 91.6621 91.1336 4 91.6621 91.1336 5 91.6621 91.1336 6 91.6621 91.1336 7 91.6621 91.1336 8 91.6621 91.1336 9 91.6621 91.1336 10 91.6621 91.1336

Output 24.8.2: Optimal Design with a Quadratic Covariate Effect

 Obs u t 1 0.46 4 2 0.54 3 3 0.58 1 4 0.60 2 5 0.73 5 6 0.77 4 7 0.82 3 8 0.84 1 9 0.89 2 10 0.95 5

When you use the BLOCKS statement without specifying the GENERATE statement, the full candidate set is used as the treatment set for optimal blocking. If you specify both statements, an optimal design for the treatments ignoring the blocks is first generated, and the result is used as the treatment set for optimal blocking. This allows several options to be combined to evaluate existing designs. For example, the following statements evaluate the optimal design given in Harville (1974) for the preceding situation:
```   data har; input t @@@@; datalines;
1   2   3   4   5   1   2   3   4   5
;
proc optex data=tmt coding=orthcan;
class t;
model t;
generate initdesign=har
method=sequential;
blocks design=cov init=chain iter=0;
model u u*u;
run;
```
The efficiency values for Harville's design are shown in Output 24.8.3. They are the same as for the design found by the OPTEX procedure.

Output 24.8.3: Treatment Efficiency Factors for Harville's Design

 The OPTEX Procedure

 Design Number TreatmentD-Efficiency TreatmentA-Efficiency 1 91.6621 91.1336

In fact, the optimal design found by OPTEX can be derived from Harville's design simply by re-labeling treatments. In order of increasing U, both designs consist of two consecutive replicates of the treatments, with treatments in both replicates occurring in the same order.

 Chapter Contents Previous Next Top