1. Home
  2. CDNBLOCKDESIGN procedure

CDNBLOCKDESIGN procedure

Constructs a block design using CycDesigN (R.W. Payne).

Options

PRINT = strings Controls printed output (design, report, factors); default * i.e. none
LEVELS = scalar or variate Numbers of levels of the treatment factors; if unset, takes the numbers of levels declared for the factors in the TREATMENTSTRUCTURE model
NREPLICATES = scalar Number of replicates
NBLOCKS = scalar Number of blocks
NUNITS = scalar Number of units per block
NGROUPS = variate Group sizes for a two-factor nested treatment structure
TREATMENTFACTORS = factors Up to four factors to use in the treatment model: one factor for a one-way treatment model, two factors for a nested structure when NGROUPS is set, or two to four factors for a factorial treatment structure when NGROUPS is not set
REPLICATES = factor Replicate factor
BLOCKS = factor Block factor
UNITS = factor Unit-within-block factor
RESOLVABLE = string Whether the design is resolvable (yes, no); default no
ALPHADESIGN = string Whether an alpha design is constructed for a resolvable design (yes, no); default no
CYCLIC = string Whether a cyclic design is constructed for a non-resolvable design (yes, no); default no
NBLATIN = scalar Number of contiguous blocks to latinize; default 0 i.e. not latinized
REPLATINGROUPS = variate Sizes of groups defining the positions of the replicates when constructing latinized designs; default * i.e. no groupings
SPATIALMODEL = string Spatial model to use with a single-treatment-factor resolvable design (integer, linearvariance, seconddifference, ev); default * i.e. none
EVDECAY = scalar Decay parameter to use when SPATIALMODEL=ev; default 0.5
WEIGHTS = variate Variate with two values specifying weightings for the main effects and for the interactions in factorial treatment structures; default !(1, 0.25)
SEED = scalar or variate Scalar or variate with two values specifying seeds for the random numbers used by CycDesigN to search for the best design and to randomize it – if a scalar is specified the same seed is used for both purposes; default 0 i.e. set automatically
SPREADSHEET = string Whether to put the design factors into a spreadsheet (design); default *
TIMELIMITS = scalar or variate A scalar or a variate containing up to three numbers defining the time in minutes to spend on the first phase, the second phase and the spatial phase of the search (if the 2nd or 3rd numbers are omitted they default to the maximum of those specified); default 1
NRANDOMIZATIONS = scalar
Number of randomizations to generate from the best design; default 1
TRIALS = factor
Trials factor

No parameters

Description

CycDesigN is a package for the computer generation of experimental designs which constructs optimal or near-optimal block and row-column designs; see the book Cyclic and Computer Generated Designs by John & Williams (1995). CycDesigN can also operate as a batch program that can be called from within Genstat. This program is distributed with Genstat, and there are procedures to call the program, read its output back into Genstat, and form the relevant design factors. There are also Genstat add-in and resource files to define user menus, which can be downloaded from the VSNi website. However, before CycDesigN can be can be used, a license must be obtained; see vsni.co.uk/software/cycdesign for details about the CycDesigN software.

This procedure, CDNBLOCKDESIGN, uses the CycDesigN algorithms to form a block design. The treatment factors, whose values are to be formed, are specified by the TREATMENTFACTORS option. This can be set to a single factor if you want a one-way treatment structure. Alternatively, if option NGROUPS is set, you can supply two factors to define a nested model

factor_1 / factor_2

The group sizes (i.e. the number of levels of the second factor within each level of the first factor) are supplied by NGROUPS, in a variate. Otherwise, if option NGROUPS is not set, you can supply from two to four factors, to define a factorial model.

The LEVELS option can be used to define the numbers of levels of the factors, as a scalar if there is only one factor, or as a variate if there are several. The levels specified in the variate are assumed to be in the same order as the order in which the factors occur in the TREATMENTFACTORS list. LEVELS can be omitted if the factors have already been declared with the right numbers of levels. Alternatively, if you want only a single treatment factor, and do not want to save its generated levels, you can specify its number of levels using LEVELS, and leave TREATMENTFACTORS unset.

The RESOLVABLE option controls whether or not the design is resolvable i.e. whether the blocks can be partitioned into sets, each of which contains a single replicate of each treatment combination. Suppose that there are v treatment combinations, b blocks, k units per block and r replicates of each treatment combination. Then in a non-resolvable design these numbers must satisfy the condition

v × r = b × k.

In a resolvable design some blocks may have only k-1 units, and following condition must be satisfied

(b – 1) × k < vb × k.

The NBLOCKS option can define the number of blocks, and the BLOCKS option can supply a factor to save the levels generated for the block factor. You can omit NBLOCKS if BLOCKS is set to a factor that has already been defined with the correct number of levels. Similarly, the NUNITS option can define the number of units within each block, and the UNITS option can supply a factor to save the levels generated for the unit-within-block factor. Finally, the NREPLICATES option can define the number of replicates of each treatment combination, and the REPLICATES option can supply a factor to save the levels generated for a replication factor.

Either NREPLICATES or REPLICATES must be specified if the design is resolvable. Apart from this constraint, any one of the pairs of options NBLOCKS and BLOCKS, or NUNITS and UNITS, or NREPLICATES and REPLICATES can be left completely unset. (CDNBLOCKDESIGN will then deduce the number of blocks, units per block or replicates, as required, from the equations above.)

The ALPHADESIGN option controls whether or not an alpha design is constructed for a resolvable design, and the CYCLIC option controls whether or not a cyclic design is constructed for a non-resolvable design.

Latinized designs are useful when the replicates of a resolvable design are set out next, or contiguous, to each other. The blocks of each replicate then form long blocks running down the replicates. You may than want to set option NBLATIN=1 to request a latinized design in which the replication of each treatment combination is equalized as far as possible within in each long block. (So, if vr × k, each treatment combination should occur no more than once.) Alternatively, setting NBLATIN to n, say, aims to equalize the occurrence of the treatment combinations within each set of n contiguous blocks. If NBLATIN is not set, the design is not latinized. By default, the replicates in a latinized design are assumed to be in a single row, side by side. The REPLATINGROUPS option allows you to to define an alternative layout. For example, setting REPLATINGROUPS=!(1,2) when you have three replicates, defines two columns of replicates, the first with one replicate (replicate 1), and the second with two replicates (replicate 2 alongside replicate 1, and replicate 3 below replicate 2).

The SPATIALMODEL option lets you request that the construction of a resolvable design should take account of the separation of different treatments in blocks. The principle is that plots close together are assumed to be correlated more than plots further apart; a spatial model attempts to model this correlation decay. The criterion used to generate spatial designs is the neighbour efficiency factor of Williams (1985), which has been extended to two-dimensional blocking structures by Williams, John & Whitaker (2005) and to cater for different decay functions. The available settings are

    integer integer,
    linearvariance linear variance,
    seconddifference modified second difference, and
    ev modified exponential variance.

The weights used with the first three settings are described by Williams (1985). The fourth setting, ev, is appropriate for a model specifying an autoregressive variance matrix. Its decay parameter is specified by the EVDECAY option; default 0.5. However, the spatial designs generated by CycDesigN are usually quite robust to the choice of weight function. Spatial models cannot be used with latinized designs.

The WEIGHTS option specifies a variate with two values to define how to weight the efficiencies of the terms when there is a factorial treatment structure. The first value defines a weight for the main effects (default 1), and the second defines a weight for the interactions (default 0.25) These defaults are the same as those used in the stand-alone CycDesigN system.

The SEED option lets you supply seeds for the random numbers to be used within CycDesigN to search for the best design and to randomize it. You can specify a variate with two values to supply a different seed for each purpose, or a scalar to use the same one for both. If a zero value is specified, the corresponding seed is set automatically. The default is the scalar zero.

By default only one randomization is done with the best design. However, you can use the NRANDOMIZATION option to provide several randomizations of that design, for use in different trials. The TRIALS option can save a factor to identify the trials.

Printed output is controlled by the PRINT option, with settings:

    design to print the design,
    report to print a report by CycDesigN on the design, and
    factors to print the factor values.

You can set option SPREADSHEET=design to put the design factors into a Genstat spreadsheet.

The TIMELIMITS option can be set to a scalar or a variate containing up to three numbers to define the time in minutes to spend on the first phase, the second phase and the spatial phase of the design search. If the second or third numbers are omitted, they default to the maximum of those specified. The default is 1.

Options: PRINT, LEVELS, NREPLICATES, NBLOCKS, NUNITS, NGROUPS, TREATMENTFACTORS, REPLICATES, BLOCKS, UNITS, RESOLVABLE, ALPHADESIGN, CYCLIC, NBLATIN, REPLATINGROUPS, SPATIALMODEL, EVDECAY, WEIGHTS, SEED, SPREADSHEET, TIMELIMITS, NRANDOMIZATIONS, TRIALS.
Parameters: none.

Method

The batch program CycDesigN is called using the SUSPEND directive.

References

John, J.A. & Williams, E.R. (1995). Cyclic and Computer Generated Designs. London: Chapman and Hall.

Williams, E.R. (1985). A criterion for the construction of optimal neighbour designs. J.R. Statist. Soc. B, 47, 487-497.

Williams, E.R., John, J.A. & Whitaker, D. (2005). Construction of resolvable spatial row-column designs. Biometrics, 62, 103-108.

See also

Procedures: CDNAUGMENTEDDESIGN, CDNPREP, CDNROWCOLUMNDESIGN.
Commands for: Design of experiments.

Example

CAPTION        'CDNBLOCKDESIGN example'; STYLE=meta
FACTOR         [LEVELS=24] treat
FACTOR         [LEVELS=6] block
FACTOR         [LEVELS=4] unit
FACTOR         [LEVELS=2] rep
CDNBLOCKDESIGN [PRINT=design; TREATMENT=treat;\
               REPLICATES=rep; BLOCKS=block; UNITS=unit;\
               RESOLVABLE=yes; ALPHA=yes; SEED=35820; TIMELIMITS=0.2]
Updated on April 25, 2023

Was this article helpful?