The PLAN Procedure
Example 87.2 A Hierarchical Design
(View the complete code for this example.)
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 87.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 87.2.1: A Hierarchical Design
Copyright © SAS Institute Inc. All rights reserved.