The %MktDes autocall macro creates efficient experimental designs. You usually do not need to call the %MktDes macro directly. Instead, you usually use the %MktEx autocall macro, which calls the %MktDes macro as one of its many tools. At the heart of the %MktDes macro are the PLAN, FACTEX, and OPTEX procedures. PROC PLAN creates full-factorial designs. PROC FACTEX creates fractional-factorial designs. You can use both procedures to create a candidate set for PROC OPTEX to search. The %MktDes macro is used instead of calling those procedures directly because the %MktDes macro has a simpler syntax. To use the macro, you specify the names of the factors, the number of levels for each factor, and the number of runs that you want in your final design. For example, you can create a design in 18 runs with two 2-level factors (
X2) and three 3-level factors (
X5) as follows:
%mktdes(factors=x1-x2=2 x3-x5=3, n=18)
You can optionally specify interactions that you want to estimate. The macro creates a candidate design in which every effect that you want to estimate is estimable but the candidate design is bigger than you want. By default, the candidate set is saved in a SAS data set called
Cand1. The macro then uses PROC OPTEX to search the candidate design for an efficient final design. By default, the final experimental design is saved in a SAS data set called
When the full-factorial design is small (by default fewer than 2,189 runs, although sizes up to 5,000 or 6,000 runs are reasonably small), the experimental design problem is straightforward. First, the %MktDes macro uses PROC PLAN to create a full-factorial candidate set. Next, PROC OPTEX searches the full-factorial candidate set. For very small problems (a few hundred candidates), PROC OPTEX often finds the optimal design. For larger problems, although PROC OPTEX might not find the absolute best design, with sufficient iterations (for example, MAXITER=100 or more) it finds very good designs. Run times usually range from a few seconds to a few minutes, but they can be longer.
%MktDes(FACTORS=factor-list <, optional arguments>)
You can specify either of the following to display the option names and simple examples of the macro syntax:
This macro specifies
options nonotes throughout most of its execution. If you want to see all the notes, submit the following statement before running the macro:
%let mktopts = notes;
To see the macro version, submit the following statement before running the macro:
%let mktopts = version;
The following example shows to use the %MktDes macro to find an optimal nonorthogonal design when the full-factorial design is small (108 runs):
%mktdes(factors=x1-x2=2 x3-x5=3, n=18, maxiter=500)
Figure 1 shows the %MktDes macro’s output.
Figure 1: %MktDes Output
The data set
Design contains the design that the macro finds:
proc print data=Design noobs; run;
Figure 2 shows the results.
Figure 2: Optimal Nonorthogonal Design
When the full-factorial design is larger, the macro uses PROC FACTEX to create a fractional-factorial candidate set. In those cases, the methods that the %MktEx macro finds usually make better designs than the methods that the %MktDes macro finds.