Resources

Optimal Design with Fixed Covariates

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: OPTEX9                                              */
 /*   TITLE: Optimal Design with Fixed Covariates                */
 /* PRODUCT: QC                                                  */
 /*  SYSTEM: ALL                                                 */
 /*    KEYS: Optimal Designs,                                    */
 /*   PROCS: OPTEX                                               */
 /*    DATA:                                                     */
 /*                                                              */
 /*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
 /*          First Edition, Volume 1 and Volume 2                */
 /*                                                              */
 /*          Harville, D. (1974). "Nearly Optimal Allocation     */
 /*          of Experimental Units Using Observed Covariate      */
 /*          Values," Technometrics 16, 589-599.                 */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

 options ps=60;

 data cov; input u @@; cards;
 .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;
 run;

 proc print data=tmtu;
 run;


 data har; input t @@; cards;
 1   2   3   4   5   1   2   3   4   5
 ;

 data t; do t = 1 to 5; output; end;
 proc optex data=t seed=28365 coding=orthcan;
    class t;
    model t;
    generate initdesign=har
             method=sequential;
    blocks design=cov init=chain iter=0;
    model u u*u;
 run;