Generates minimum aberration block or fractional factorial designs (P.J. Laycock, P.J. Rowley & R.W. Payne).
|Controls whether or not to print a plan of the design (
||Controls whether or not to analyse the design, and produce a skeleton analysis-of-variance table using
||Limit on number of factors in treatments terms in the analysis of variance; default 3|
||Levels for the treatment factors in each design|
||Number of treatment factors|
||Number of units per block|
||Defines the number of the block to use to define a fractional factorial, or can be set to zero to take a block at random; if unset in an interactive run
||Number of units in each sub-block|
||Seed to be used to randomize each design; a negative value implies no randomization|
||Specifies identifiers for the treatment factors|
||Identifier for the block factor|
||Identifier for the sub-block factor|
||Specifies identifiers for pseudo-factors|
||Specifies the identifier of a variate to store a unique numerical label for each unit in the design|
||Saves or defines the design number|
||Saves or defines the sub-design number|
||Saves a command to recreate each design (useful if the design information has been specified in response to questions from
AGFACTORIAL generates efficient block or fractional factorial designs using the minimum aberration algorithm of Laycock & Rowley (1995), implemented in the
AFMINABERRATION directive. It also sets the block and treatment formulae (using the
TREATMENTSTRUCTURE directives), and generates any pseudo-factors needed to analyse the design using the
To explain minimum aberration for a block design, we start by defining the resolution of a design as the largest integer r such that no interaction term with r factors is confounded with blocks. The aberration of the design is the number of interaction terms with r+1 factors that are confounded. A minimum aberration design is defined as a design with the smallest aberration out of the designs with the highest available resolution. So, essentially this minimizes the number of interactions with the minimum number of factors that are confounded. The definition for a fractional factorial design is essentially the same. The fractional factorial is constructed by taking only one block from the block design, and the terms that were confounded with blocks in the block design become aliased in the fractional factorial.
AGFACTORIAL can be used either in batch or interactively. In an interactive run, it obtains the information necessary to select and define the design by asking questions. You need set the parameters only if you wish to anticipate some of the questions, or if you wish to use
AGFACTORIAL in batch. If, however, you wish to recreate the same design later, the
STATEMENT parameter allows you to save a Genstat text structure containing a command specifying the same information.
LEVELS parameter defines the number of levels of the treatment factors, either as a scalar or by providing a text or variate with the required number of levels, to use for the
LEVELS option of the
FACTOR directive. This must be a prime number (e.g. 2, 3, 5, 7, 11) or a power of a prime number (e.g. 4, 8, 9). The number of treatment factors is specified by the
NTREATMENTFACTOR parameter. The number of the units in each block (or, equivalently, the number of units in a fractional factorial) is specified by the
NUNITS parameter; this must be a power of the number of levels. The
NFRACTIONBLOCK parameter allows you to form a fractional factorial, either by setting it to the number of the block to take, or by setting it to zero to take a block at random; if you set
NFRACTIONBLOCK to a scalar containing a missing value,
AGFACTORIAL forms a block design. You can define blocks for a fractional factorial (or, equivalently, sub-blocks for a block design) by defining their size using
NSUBUNITS parameter; this too must be a power of the number of levels.
SEED parameter allows you to specify a seed to be used to randomize the design. In batch the default seed is -1, to suppress randomization. If you do not set
SEED when running interactively
AGFACTORIAL will ask for a seed, and again a negative value suppresses any randomization.
TREATMENTFACTORS parameter can specify a pointer to supply identifiers for the treatment factors in the design. For example, if there are two factors you could define their identifiers to be
B by forming the pointer
Tf (say) with the statement
POINTER [VALUES=A,B] Tf
and then setting
TREATMENTFACTORS=Tf. Alternatively, and more succinctly, you could put
!p(A,B) is an unnamed pointer containing the required two identifiers. The
SUBBLOCKS parameters allow you to specify identifiers for the block and sub-block factors. Designs where the treatment factors have more than two levels may require pseudo-factors to be defined in order for them to be analysed by
PSEUDOFACTORS parameter can specify a pointer to supply their identifiers. If the treatment, block or sub-block factors and any necessary pseudo-factors are not specified in a batch run,
AGFACTORIAL will use identifiers that are local within the procedure and thus lost at the end of the procedure. If you are running interactively,
AGFACTORIAL will ask you to provide identifiers, and these will remain available after
AGFACTORIAL has finished running.
UNITLABELS parameter can specify a variate to store a unique number to label each of the units in the design. In the first block, the variate contains the numbers one up to the number of units per block. The second block contains these numbers plus the smallest power of ten greater than the number of units per block, the third block contains the numbers plus twice this power of ten, and so on.
design to print the plan of the design, and
summary to print a summary of the design properties. By default, if you are running Genstat in batch, these are not printed. If you do not set
AGFACTORIAL will ask whether or not you wish to print them. Similarly the
ANALYSE option governs whether or not
AGFACTORIAL produces a skeleton analysis-of-variance table (containing just source of variation, degrees of freedom and efficiency factors). Again
AGFACTORIAL 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. The
FACTORIAL option sets a limit on the number of factors in the treatment terms in the analysis of variance; by default, this is three.
NDESIGN parameter can save a unique design number for the design, and the
NSUBDESIGN can save a unique number for the sub-design of the design (as defined by Laycock & Rowley 1995). You can input these with
NSUBDESIGN later, along with the same settings for
NSUBUNITS, to generate the design factors again without repeating the design search.
QUESTION procedure is used to obtain the details of the required design. The design is selected using the Laycock & Rowley (1995) search algorithm for minimum aberration designs, as implemented in the
AFMINABERRATION directive. The block and treatment factors are then generated using the standard Genstat directives for calculation and manipulation.
Laycock, P.J. & Rowley, P.J. (1995). A method for generating and labelling all regular fractions or blocks for qn–m designs. Journal of the Royal Statistical Society, Series B, 57, 191-204.
CAPTION 'AGFACTORIAL example',\ '2x2x2x2x2x2 design in 4 blocks of size 16'; STYLE=meta,plain AGFACTORIAL [PRINT=design; ANALYSE=yes; FACTORIAL=6] 2; NTREATMENTFACTORS=6;\ NUNITS=16; NSUBUNITS=!s(*); NFRACTIONBLOCK=!s(*);\ TREATMENTFACTORS=!p(A,B,C,D,E,F); BLOCKS=Blocks;\ UNITLABELS=Labels; SEED=-1 CAPTION '4x4x4x4 design in 16 blocks of size 16' AGFACTORIAL [PRINT=design; ANALYSE=yes; FACTORIAL=4] 4; NTREATMENTFACTORS=4;\ NUNITS=16; NSUBUNITS=!s(*); NFRACTIONBLOCK=!s(*);\ TREATMENTFACTORS=!p(j,k,l,m); BLOCKS=blocks; PSEUDOFACTORS=pf;\ UNITLABELS=labels; SEED=-1 CAPTION '1/4 fraction of a 2x2x2x2x2x2 design in 2 blocks of size 8' AGFACTORIAL [PRINT=design; ANALYSE=yes; FACTORIAL=6] 2; NTREATMENTFACTORS=6;\ NUNITS=16; NFRACTIONBLOCK=1; NSUBUNITS=8; SUBBLOCKS=block;\ TREATMENTFACTORS=!p(a,b,c,d,e,f); UNITLABELS=label; SEED=-1