Constructing the L18 Orthogonal Array
/****************************************************************/
/* S A S S A M P L E L I B R A R Y */
/* */
/* NAME: FACTEX6D */
/* TITLE: Constructing the L18 Orthogonal Array */
/* PRODUCT: QC */
/* SYSTEM: ALL */
/* KEYS: Design of Experiments, Factorial Designs, */
/* PROCS: FACTEX */
/* DATA: */
/* */
/* REF: SAS/QC Software: Examples */
/* MISC: */
/* */
/****************************************************************/
options ps=60;
proc factex;
factors x2-x5 / nlev=3;
size design=9;
model r=3;
output out=a x2 nvals=(0 1 2) x3 nvals=(0 1 2)
x4 nvals=(0 2 1) x5 nvals=(0 1 2);
run;
data group1;
set a;
x1 = 0;
x6 = mod( x2**2 + x3 , 3);
x7 = mod( x2**2 + x4 , 3);
x8 = mod( x2**2 + 2*x5 , 3);
run;
data group2;
set group1;
drop tx7;
x1 = 1;
x4 = mod( x4 + 2 , 3);
x5 = mod( x5 + 1 , 3);
x6 = mod( x2**2 + x6 , 3);
tx7 = x7;
x7 = mod( x2**2 + x8 + 1 , 3);
x8 = mod( x2**2 + tx7 + 1 , 3);
run;
data L18;
set group1 group2;
run;
title 'The L18 Orthogonal Array';
proc print data=L18;
var x1-x8;
run;
title;