Example 67.2 A Hierarchical Design
In this example, three plants are nested within four pots, which are nested within three houses. The FACTORS statement requests a random permutation of the numbers 1, 2, and 3 to choose Houses randomly. The second step requests a random permutation of the numbers 1, 2, 3, and 4 for each of those first three numbers to randomly assign Pots to Houses. Finally, the FACTORS statement requests a random permutation of 1, 2, and 3 for each of the 12 integers in the second set of permutations. This last step randomly assigns Plants to Pots. The following statements produce Output 67.2.1:
title 'Hierarchical Design';
proc plan seed=17431;
factors Houses=3 Pots=4 Plants=3 / noprint;
output out=nested;
run;
proc print data=nested;
run;
Output 67.2.1
A Hierarchical Design
1 |
3 |
2 |
1 |
3 |
3 |
1 |
3 |
1 |
1 |
1 |
3 |
1 |
1 |
1 |
1 |
1 |
2 |
1 |
2 |
2 |
1 |
2 |
3 |
1 |
2 |
1 |
1 |
4 |
3 |
1 |
4 |
2 |
1 |
4 |
1 |
2 |
4 |
1 |
2 |
4 |
3 |
2 |
4 |
2 |
2 |
2 |
2 |
2 |
2 |
1 |
2 |
2 |
3 |
2 |
3 |
2 |
2 |
3 |
3 |
2 |
3 |
1 |
2 |
1 |
2 |
2 |
1 |
3 |
2 |
1 |
1 |
3 |
4 |
1 |
3 |
4 |
3 |
3 |
4 |
2 |
3 |
1 |
3 |
3 |
1 |
2 |
3 |
1 |
1 |
3 |
2 |
1 |
3 |
2 |
2 |
3 |
2 |
3 |
3 |
3 |
3 |
3 |
3 |
2 |
3 |
3 |
1 |
Copyright © SAS Institute Inc. All rights reserved.