1. Home
  2. CDNPREP procedure

CDNPREP procedure

Constructs a multi-location partially-replicated design using CycDesigN (R.W. Payne).

Options

PRINT = strings Controls printed output (design, report, factors, blocknumbers); default * i.e. none
LEVELS = scalar Numbers of levels of the treatment factor; if unset, takes the numbers of levels declared for the factor specified by the TREATMENTS option
NLOCATIONS = scalar Number of locations
NBLOCKS = scalar Number of blocks at each location
NUNITSPERLOCATION = scalar Number of units at each location
NREPLICATEDPERBLOCK = scalar Number of treatments in each block that are replicated at the location containing the block
TREATMENTS = factor Treatment factor
LOCATIONS = factor Locations factor
BLOCKS = factor Block factor
UNITS = factor Unit-within-block factor
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 *
TIMELIMIT = scalar Time in minutes to search; default 1

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 used, a license must be obtained; see vsni.co.uk/software/cycdesign for details.

This procedure, CDNPREP, uses the CycDesigN algorithms to form a partially-replicated block design. The assumption in CycDesigN is that the experiment will contain incomplete-block designs conducted at several locations and that, at each location, some treatments will occur twice, others may occur only once, and others may not occur at all. However, the treatments are all replicated the same number of times over the whole design. So there is the constraint that the total number of units, or plots, in the design must be a multiple of the number of treatments. Also, the number of units at each location must be greater than the number of treatments, and less than twice the number of treatments.

The LEVELS option can be set to a scalar to define the number of treatments, and the TREATMENTS option can save a factor containing the generated values. LEVELS can be omitted if the TREATMENTS factor has already been declared with the right numbers of levels. Alternatively, if you only want to print the design and do not want to save the values, you can specify the number of levels using LEVELS, and leave TREATMENTS unset. Similarly, the NLOCATIONS option can define the number of locations, and the LOCATIONS option can supply a factor to save the values generated for the locations factor. You can omit NLOCATIONS if LOCATIONS is set to a factor that has already been defined with the correct number of levels.

The number of units, or plots, at each location must be specified by the NUNITSPERLOCATION option, and must satisfy the constraints mentioned above. CycDesigN also needs to know the number of blocks at each location, and the number of treatments in each block that will be amongst those that are replicated (i.e. occur twice) at each location. These can be specified by the NBLOCKS and NREPLICATEDPERBLOCK options, respectively. However, designs are available for only limited combinations of values, and CDNPREP will give a fault diagnostic if you specify values that are not included in the feasible combinations. You can set option PRINT=blocknumbers to print the possibilities, and CDNPREP will then stop unless NBLOCKS and NREPLICATEDPERBLOCK are both set. Alternatively, if you are running Genstat interactively, CDNPREP will use the QUESTION procedure to prompt you to choose values from those that are feasible. Finally, if you are running Genstat in batch, CDNPREP will take the median number of feasible blocks and the corresponding median number of replicated treatments per block. Smaller values for NREPLICATEDPERBLOCK allow more of the treatments to be represented at each location, while larger values provide more residual degrees of freedom.

The BLOCKS option can supply a factor to save the values generated for the block factor, and the UNITS option can supply a factor to save the values generated for the unit-within-block factor (which identifies the units within each block).

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,
    factors to print the factor values, and
    blocksizes to print the feasible block sizes, and corresponding minimum and maximum numbers of replicated treatments in each block.

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.

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

The TIMELIMIT defines the time in minutes to search. The default is 1.

Options: PRINT, LEVELS, NLOCATIONS, NBLOCKS, NUNITSPERLOCATION, NREPLICATEDPERBLOCK, TREATMENTS, LOCATIONS, BLOCKS, UNITS, SEED, SPREADSHEET, TIMELIMIT.

Parameters: none.

Method

The batch program CycDesRun is called using the SUSPEND directive. The underlying algorithm is described by Williams, John & Whitaker (2014).

References

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

Williams, E.R., John, J.A. & Whitaker, D. (2014). Construction of more flexible and efficient p-rep designs. Australian & New Zealand Journal of Statistics, 56, 89-96.

See also

Procedures: AFPREP, CDNAUGMENTEDDESIGN, CDNBLOCKDESIGN, CDNROWCOLUMNDESIGN.
Commands for: Design of experiments.

Example

CAPTION 'CDNPREP example',\
        !t('Design for 120 treatments at 3 sites,',\
        'each with 8 blocks of 20 plots.'); STYLE=meta,plain
" look at feasible numbers of blocks and treatments replicated in each block "
CDNPREP [PRINT=blocknumbers; LEVELS=120; NLOCATIONS=3; NUNITSPERLOCATION=160]
" form design with 8 blocks, each containing 15 replicated treatments "
CDNPREP [PRINT=design; LEVELS=120; NLOCATIONS=3; NUNITSPERLOCATION=160;\
        NBLOCKS=8; NREPLICATEDPERBLOCK=15; SEED=!(397010,822399); TIME=0.2]
Updated on October 28, 2020

Was this article helpful?