/**********************************************************************/ /* Atkinson, Donev, and Tobias, "Optimum Experimental Designs" */ /* */ /* NAME: Program 15.3 */ /* TITLE: SAS Task 15.1 - Blocked second-order designs */ /* KEYS: */ /* DATA: */ /* NOTES: Uses a macro that is similar to, but not the same as, the */ /* one in Program 15.1. */ /* */ /* Author: Randy Tobias */ /* History: */ /* Created...............................................27Jun2007 */ /**********************************************************************/ title1 "SAS Task 15.1 - Blocked second-order designs"; %macro BlockedDesign(n1,n2,n3); options nonotes; title2 "Optimal design for (&n1:&n2:&n3)"; /* / Create candidate points (-1,0,1)**m and blocks with the given / configuration. /---------------------------------------------------------------------*/ proc factex; factors x1 x2 / nlev=3; output out=Candidates; data Blocks; Block=1; do i=1 to &n1; output; end; Block=2; do i=1 to &n2; output; end; Block=3; do i=1 to &n3; output; end; run; /* / Find the D-optimal design with OPTEX and save the efficiencies. /---------------------------------------------------------------------*/ proc optex data=Candidates coding=orthcan; model x1|x2@2 x1*x1 x2*x2; block design=Blocks niter=1000 keep=10; class Block; model Block; output out=opDesign; run; proc print data=opDesign; run; title2; options notes; %mend; %BlockedDesign(4,4,4); %BlockedDesign(3,4,5); title1;