1. Home
  2. AGBIB procedure

AGBIB procedure

Generates balanced incomplete block designs (R.W. Payne).


PRINT = string token Controls whether or not to print a plan of the design and whether to print a catalogue of the designs in the subfile (design, catalogue); if unset in an interactive run AGBIB will ask whether the design is to be printed, in a batch run the default is not to print anything
ANALYSE = string token 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


LEVELS = scalars Number of treatments
NBLOCKS = scalars Number of blocks
NUNITS = scalars Number of units per block
SEED = scalars Seed for randomization; a negative value implies no randomization
TREATMENTS = factors Identifier for the treatment factor
BLOCKS = factors Identifier for the factor to index the blocks
UNITS = factors Identifier for the factor to index the units within each block
STATEMENT = texts Saves a command to recreate each design (useful if the design information has been specified in response to questions from AGBIB)


Incomplete block designs occur when the units in an experiment need to be divided into blocks that are not large enough to contain a unit for every treatment. In a balanced incomplete block design the contents of the blocks are arranged so that every pair of treatments occurs in an equal number of blocks. All comparisons between treatments are thus made with equal accuracy, so the design is balanced and, in particular, can be analysed by ANOVA.

AGBIB provides a range of balanced incomplete block designs, and is easiest to use interactively. It then asks questions to determine the necessary information to form the design. The options and parameters allow you to anticipate questions, or to define all the necessary information if you want to use AGBIB 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.

First of all, AGBIB asks you to select the design. It lists those available, specifying the number of treatments, the number of blocks, the size of each block and the number of blocks containing each pair of treatments. Alternatively, if you set the LEVELS parameter to the required number of treatments, the NBLOCKS parameter to the number of blocks and the NUNITS parameter to the number of units per block, AGBIB will select the design (if available) automatically.

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 AGBIB will ask for a seed, and again a negative value suppresses any randomization.

Parameters TREATMENTS, BLOCKS and UNITS, allow you to specify identifiers for the treatment, the block and unit-within-block factors. If these are not specified in a batch run, AGBIB will use identifiers that are local within the procedure and thus lost at the end of the procedure. If you are running interactively, AGBIB will ask you to provide identifiers, and these will remain available after AGBIB has finished running.

The PRINT option controls printed output, with setting design to print a plan of the design, and catalogue to print a list of the available designs. By default, if you are running Genstat in batch, nothing is printed. If you do not set PRINT when running interactively, AGBIB will ask whether or not you wish to print the design, after it has been generated. Similarly the ANALYSE option governs whether or not AGBIB produces a skeleton analysis-of-variance table (containing just source of variation, degrees of freedom and efficiency factors). Again AGBIB 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.




AGBIB generates designs with blocks of size two by using the standard Genstat calculation and manipulation facilities to form all the combinations of pairs of treatments. Other designs are generated from Hadamard matrices, as described by Hedayat & Wallis (1978). The QUESTION procedure is used to obtain the necessary details of the design. The matrices are then recovered from a backing-store file and the standard Genstat manipulation directives are used to generate the design.


Hedayat, A. & Wallis, W.D. (1978). Hadamard matrices and their applications. Annals of Statistics, 6, 1184-1238.

See also


Commands for: Design of experiments, REML analysis of linear mixed models.


CAPTION  'AGBIB example',!t('This lists the available designs',\
         'and prints the (unrandomized) plan of a design',\
         'for 7 treatments in 7 blocks of size 3.'); STYLE=meta,plain
AGBIB    [PRINT=design,catalogue; ANALYSE=yes] LEVELS=7; NBLOCKS=7; \
         NUNITS=3; SEED=-1; TREATMENTS=treat; BLOCKS=block; UNITS=plot
Updated on June 20, 2019

Was this article helpful?