Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Proc Plan

2 views
Skip to first unread message

Randy Tobias

unread,
Sep 17, 1998, 3:00:00 AM9/17/98
to
D. Knowles wrote in message <1998091712...@lamb.sas.com>...
>Hi,
>
>I need to create a BIB experimental design for a consumer test. I have 8
>products and plan for each of 36 subjects to taste 4 (of 8) randomly
selected
>products on day 1 and the remaining 4 products (randomized) on day 2. I've
>been trying to accomplish this with Proc Plan and while the selection for
day
>1 is easy enough, the complementary selections for day 2 seem
uncontrollable.
>Can you help?
>
>
>dknowles

PLAN isn't really the right SAS tool to use; OPTEX from SAS/QC software is.
OPTEX works by finding an optimal design for a given set of candidates and
model; BIBD's are optimal, so if one's available (and if the problem isn't
too large) it should find it. In this case, it doesn't seem like a BIBD is
available, although OPTEX's resulting design is awful close---better than
99.9% D-efficient

Here's how you run OPTEX:

data Treat; /* The candidate data set is just the eight products in
this case. */
do Product=1 to 8;
output;
end;
proc optex data=Treat coding=orthcan;
class Product;
model Product;
block structure=(36)4 niter=100 keep=10;
output out=Design
blockname=Subject;
run;

OPTEX tries 100 times to find the optimal design, using a randomized
combinatorial optimzation algorithm. The OPTEX printed results are the
efficiencies of the 10 best designs found.

Design Treatment Treatment Block Design
Number D-efficiency A-efficiency D-Efficiency
------------------------------------------------------
1 85.6960 85.6779 99.9787
2 85.6960 85.6779 99.9787
3 85.6960 85.6779 99.9787
4 85.6960 85.6779 99.9787
5 85.6960 85.6779 99.9787
6 85.6960 85.6779 99.9787
7 85.6960 85.6779 99.9787
8 85.6960 85.6779 99.9787
9 85.6960 85.6779 99.9787
10 85.6960 85.6779 99.9787

In this case, it's the third column that counts: evidently the 10 best
designs were all essentially the same, indicating that OPTEX has done about
as good as it's going to do and probably as good as it's possible to do.

Here's the resulting design,

proc transpose data=Design out=DesignT; by Subject;
proc print data=DesignT noobs;
var Subject Col:;
run;

SUBJECT COL1 COL2 COL3 COL4

1 5 4 1 2
2 6 4 3 1
3 4 2 5 8
4 7 2 5 8
5 7 1 3 8
6 1 3 2 4
7 6 3 5 1
8 7 2 5 6
9 1 2 3 6
10 5 6 1 7
11 4 6 5 3
12 7 2 8 1
13 8 5 6 3
14 1 2 7 4
15 8 6 7 4
16 1 2 3 5
17 4 1 6 7
18 4 8 2 3
19 3 2 6 8
20 4 1 7 5
21 3 1 8 7
22 6 4 2 5
23 8 4 5 1
24 7 3 6 2
25 3 4 7 5
26 2 8 5 1
27 6 3 5 7
28 6 2 8 1
29 8 7 4 3
30 7 6 4 8
31 6 1 4 8
32 5 2 7 3
33 2 8 7 6
34 3 4 8 5
35 7 3 4 2
36 1 5 6 8

Is it really as good as we can do? Could we find a balanced design (100%
D-efficient) if we really tried? No: here's some IML code for examining the
Product-by-Product within Subject co-incidence matrix.

proc iml;
use Design; read all var {Subject Product};
Z = design(Subject);
X = design(Product);
print (X`*Z*Z`*X) [format=2.];

#TEM1005
18 8 7 8 8 8 7 8
8 18 8 7 8 7 8 8
7 8 18 8 8 8 8 7
8 7 8 18 8 7 8 8
8 8 8 8 18 8 7 7
8 7 8 7 8 18 8 8
7 8 8 8 7 8 18 8
8 8 7 8 7 8 8 18

The entries are all either 7 or 8; this is as good as you're gonna do.

Hope this helps.

--
Randy Tobias SAS Institute Inc. sas...@unx.sas.com
(919) 677-8000 x7933 SAS Campus Dr.
(919) 677-8123 (Fax) Cary, NC 27513-2414

Faith, faith is an island in the setting sun.
But proof, yes: proof is the bottom line for everyone.
-- Paul Simon


0 new messages