AGHIERARCHICAL procedure

Generates orthogonal hierarchical designs (R.W. Payne).


Options

PRINT = string
Controls whether or not to print a plan of the design (design); if unset in an interactive run AGHIERARCHICAL will ask whether the design is to be printed, in a batch run the default is not to print the design

ANALYSE = string
Controls whether or not to analyse the design, and produce a skeleton analysis-of-variance table using ANOVA (no, yes); default is to ask if this is unset in an interactive run, and not to analyse if it is unset in a batch run

SEED = scalars
Seed to be used to randomize each design; a negative value implies no randomization

STATEMENT = text
Saves a command to recreate the design (useful if the design information has been specified in response to questions from AGHIERARCHICAL)

EXCLUDELEVELS = scalars
Levels of the first block factor to exclude during randomization


Parameters

BLOCKFACTORS = factors
Specifies the identifier for the block factor used to index the units of each stratum (or level of the hierarchy)

TREATMENTFACTORS = factors or pointers
Specifies the identifier of the treatment factor or factors applied to the units of each stratum

LEVELS = scalars or pointers
Number of levels for the treatment factors in each stratum; if required, a pointer can contain an extra scalar to specify replication


Description

AGHIERARCHICAL forms orthogonal hierarchical designs: for example randomized blocks, split-plots, split-split-plots, and so on. The units of each stratum (or level of the hierarchy) are identified by a block factor: for example Replicates, Blocks, Plots, Subplots, Subjects &c.

   AGHIERARCHICAL can be used either interactively or in batch. Interactively, there is no need to set any options or parameters - the procedure will ask questions to ascertain the necessary details of the design. If, however, you wish to recreate the same design later, the STATEMENT option allows you to save a GenStat text structure containing a command specifying the same information.

   The first question is to find out what type of design you want to generate: either a completely randomized design, a randomized block design. a split-plot design, a split-split-plot design or a general hierarchical design. For a general hierarchical design, you will then be asked how many block factors (and thus strata) there are in the design, but this is predefined for the other designs. For example, a completely randomized design has a single blocking factor (e.g. Units). For a randomized block design there would be two, for example Blocks and Plots, defining strata for blocks and for plots within blocks. In a split-plot design there are three (for example Blocks, Wholeplots and Subplots) giving strata for blocks, whole plots within blocks and subplots within whole plots, while in a split-split-plots design there are four.

   The questions then involve each stratum in turn, and asking first for the name of the block factor to be used to identify the units of the stratum. Next it asks how many treatment factors are applied to the units of that stratum. In a randomized block design, there are no treatment factors applied to the blocks and one, or more, applied to the plots, whereas in a split-plot design treatments are applied to both the whole plots and the subplots. It then asks for the names of the treatment factors, and how many levels they are to have. Alternatively, if there are no treatments applied to the stratum, AGHIERARCHICAL asks how many levels the corresponding block factor should have - so, for example, it would how many blocks there should be in a randomized block or a split-plot design.

   The example below shows the questions and answers (displayed in bold font) to generate a randomized complete block design. The design has three blocks and six units (plots) within each block. There are two treatment factors: Type with two levels, and Amount with three levels. (Note: in GenStat for Windows, the questions would be the same but they appear in pop-up menus.)

> What type of design do you want?

c completely randomized design

r randomized block design

s split-plot design

ss split-split-plot design

o other

Code (c,r,s,ss,o; Default: r) > r

 

What would you like to call the block factor?

Identifier (Default:Blocks) >

 

How many replicates are there of Blocks?

Number > 3

 

What would you like to call the unit-within-block factor?

Identifier (Default:Units) >

 

How many treatment factors are there?

Number > 2

 

What would you like to call treatment factor 1?

Identifier > Type

 

How many levels does treatment factor Type have?

Number > 2

 

What would you like to call treatment factor 2?

Identifier > Amount

 

How many levels does treatment factor Amount have?

Number > 3

 

Seed for randomization (-1 for none)?

Number (Default: -1) >

 

Do you want to print the design?

n no

y yes

Code (n,y; Default n) > n

 

Do you want to check the design by ANOVA?

n no

y yes

Code (n,y; Default n) > n

   The parameters of AGHIERARCHICAL provide an alternative way of providing the details of the design. BLOCKFACTORS lists the block factors for the strata, TREATMENTFACTORS defines factors for the treatments applied to the units of the strata and LEVELS defines the levels of treatments and replication of block factors. For example

AGHIERARCHICAL [PRINT=design; ANALYSE=yes] \

                    Blocks,Plots; *,A; 3,5

defines a randomized block design with three blocks, and a single treatment factor A (applied to the plots) with five levels. If there are several factors in a stratum, the identifiers should be placed into a pointer. For example,

AGHIERARCHICAL Blocks,Plots; *,!p(A,B); 3,2

for a randomized block design with two treatment factors, A and B, both with two levels. Similarly, if the factors in a stratum have different numbers of levels, the LEVELS parameter may contain pointers.

AGHIERARCHICAL Blocks,Plots; *,!p(A,B); 3,!p(2,3)

defines A to have two levels and B to have three. The pointer can contain an extra element to indicate that there is to be replication (as well as treatments) in a stratum.

AGHIERARCHICAL Blocks,Plots; *,!p(A,B); 3,!p(2,3,4)

indicates that there are to be four replicates of the A and B combinations on the plots of each block.

   In an interactive run, AGHIERARCHICAL will ask about the treatment factors and the levels if these are not set. In a batch run all three parameters must be set.

   The SEED option allows you to specify a seed to randomize the design. In a batch run, this has a default of -1, to suppress randomization. If SEED is unset in an interactive run, you will be asked to provide a seed (and again a negative value will leave the design unrandomized). You can use the EXCLUDELEVELS parameter to specify levels of the first block factor that you do not wish to randomize. (This can be useful in "demonstration experiments", when the treatments may need to be kept in a systematic order in some parts of the trial, but it is not a good idea in more normal situations.)

   AGHIERARCHICAL has two other options. The PRINT option can be set to design to print the plan of the design. By default, if you are running GenStat in batch, the plan is not printed. If you do not set PRINT when running interactively, AGHIERARCHICAL will ask whether or not you wish to print the design. Similarly the ANALYSE option governs whether or not AGHIERARCHICAL produces a skeleton analysis-of-variance table (containing just source of variation, degrees of freedom and efficiency factors). Again AGHIERARCHICAL assumes that this is not required if ANALYSE is unset in a batch run, and asks whether it is required if ANALYSE is unset in an interactive run.


Options: PRINT, ANALYSE, SEED, STATEMENT, EXCLUDELEVELS.

Parameters: BLOCKFACTORS, TREATMENTFACTORS, LEVELS.


Method

The QUESTION directive is used to obtain the details of the required design. The design is then generated using GENERATE and the other standard GenStat directives for calculation and manipulation.