A Nonstandard Linear Model

 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: OPTEX3                                              */
 /*   TITLE: A Nonstandard Linear Model                          */
 /* 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                */
 /*    MISC:                                                     */
 /*                                                              */
 /****************************************************************/

options ps=60;

data a;
   drop theta pi;
   array c{4} c1-c4;
   array s{3} s1-s3;
   pi = arcos(-1);
   do habitat=1 to 4;
      do month=1 to 12;
         theta = pi * month / 4;
         do i=1 to 4; c{i} = cos(i*theta); end;
         do i=1 to 3; s{i} = sin(i*theta); end;
         output;
      end;
   end;

proc optex seed=193030034 data=a;
   class    habitat;
   model    habitat month c1-c4 s1-s3 / noint;
   generate n = 12;
   title 'Sampling Wildlife Habitats Over Time';
run;
   output out = d1 number = 1;
run;
   output out = d6 number = 6;
run;

proc sort data=d1;
   by  month habitat;

proc print data=d1;
   var month habitat;
title 'The Best Design';
run;

proc sort data=d6;
   by  month habitat;

proc print data=d6;
   var month habitat;
title 'A Design with Lower A-efficiency';
run;

proc optex seed=193030034 data=a;
   class    habitat;
   model    habitat month c1-c4 s1-s3 / noint;
   generate n = 12 criterion=A;
   title 'Searching Directly for an A-efficient Design';
run;

title;