1. Home
  2. AGFACTORIAL procedure

AGFACTORIAL procedure

Generates minimum aberration block or fractional factorial designs (P.J. Laycock, P.J. Rowley & R.W. Payne).

Options

PRINT = string token Controls whether or not to print a plan of the design (design); if unset in an interactive run AGFACTORIAL will ask whether the design is to be printed, in a batch run the default is not to print the design
ANALYSE = string token Controls whether or not to analyse the design, and produce a skeleton analysis-of-variance table using ANOVA (yes, no); default is to ask if this is unset in an interactive run, and not to analyse if it is unset in a batch run
FACTORIAL = scalar Limit on number of factors in treatments terms in the analysis of variance; default 3

Parameters

LEVELS = scalars, variates or texts Levels for the treatment factors in each design
NTREATMENTFACTORS = scalars Number of treatment factors
NUNITS = scalars Number of units per block
NFRACTIONBLOCK = scalars 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 AGFACTORIAL will ask whether to form a fractional factorial design, in a batch run the default is to form the full (block) design
NSUBUNITS = scalars Number of units in each sub-block
SEED = scalars Seed to be used to randomize each design; a negative value implies no randomization
TREATMENTFACTORS = pointers Specifies identifiers for the treatment factors
BLOCKS = factors Identifier for the block factor
SUBBLOCKS = factors Identifier for the sub-block factor
PSEUDOFACTORS = pointers Specifies identifiers for pseudo-factors
UNITLABELS = variates Specifies the identifier of a variate to store a unique numerical label for each unit in the design
NDESIGN = scalars Saves or defines the design number
NSUBDESIGN = scalars Saves or defines the sub-design number
STATEMENT = texts Saves a command to recreate each design (useful if the design information has been specified in response to questions from AGFACTORIAL)

Description

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 BLOCKSTRUCTURE and TREATMENTSTRUCTURE directives), and generates any pseudo-factors needed to analyse the design using the ANOVA directive.

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.

The 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.

The 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.

The 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 A and 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 TREATMENTFACTORS=!p(A,B), where !p(A,B) is an unnamed pointer containing the required two identifiers. The BLOCKS and 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 ANOVA. The 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.

The 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.

The PRINT option can be set to 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 PRINT when running interactively, 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.

The 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 NDESIGN and NSUBDESIGN later, along with the same settings for LEVELS, NTREATMENTFACTORS, NUNITS and NSUBUNITS, to generate the design factors again without repeating the design search.

Options: PRINT, ANALYSE, FACTORIAL.

Parameters: LEVELS, NTREATMENTFACTORS, NUNITS, NFRACTIONBLOCK, NSUBUNITS, SEED, TREATMENTFACTORS, BLOCKS, SUBBLOCKS, PSEUDOFACTORS, UNITLABELS, NDESIGN, NSUBDESIGN, STATEMENT.

Method

The 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.

References

Laycock, P.J. & Rowley, P.J. (1995). A method for generating and labelling all regular fractions or blocks for qnm designs. Journal of the Royal Statistical Society, Series B, 57, 191-204.

See also

Directive: AFMINABERRATION.

Procedures: AGDESIGN, AGFRACTION, AGHIERARCHICAL.

Commands for: Design of experiments, Analysis of variance.

Example

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
Updated on June 20, 2019

Was this article helpful?