1. Home
  2. CDBPREP procedure

CDBPREP procedure

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

Options

PRINT = string tokens Controls printed output (design, report, factors, blocknumbers, debug); default * i.e. none
LEVELS = scalar or variate Levels of the treatment factor; if unset, takes the levels declared for the factor specified by the TREATMENTS option
LEVCONTROLS = scalar or variate Levels of a control factor (if required); if unset, takes the levels declared for the factor specified by the CONTROLS option
NLOCATIONS = scalar Number of locations
NBLOCKSPERLOCATION = scalar Number of blocks at each location
NUNITSPERBLOCK = scalar Number of units in each block
NDUPLICATESPERLOCATION = scalar Number of treatments that are replicated at each location
NCONTROLSPERLOCATION = scalar or variate Number of times that the control treatments occur at each location
MINREPLICATION = scalar Minimum number of times each treatment occurs in the design
TREATMENTS = factor Treatment factor
CONTROLS = factor Control 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 token Whether to put the design factors into a spreadsheet (design); default *
MAXCYCLE = scalar or variate Limits on the number of iterations to use in each phase of the algorithm; default * i.e. no constraint
TIMELIMITS = scalar or variate Time in minutes to search in each phase of the algorithm; default 1

No Parameters

Description

This procedure uses the algorithms in CycDesigN to form a multi-location partially-replicated block design. It replaces the procedure CDNPREP, which uses the more limited algorithm in the earlier CycDesigN 6 release. However CDNPREP is retained in the library for use in earlier programs.

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. You can also use the CDNUSERMENUS procedure to install user menus to form the designs. However, to use CycDesigN (and the procedures) you need a license; see vsni.co.uk/software/cycdesign for details.

 A multi-location partially-replicated block design is a design at several locations, such that each treatment appears at most twice at each location. The treatment should occur a similar number of times over the whole design. It may not be possible for the treatments to have equal replication, but the replications should differ by no more than one. CDBPREP can also form the design for a single location. The replications will then be either one or two.

 The LEVELS option can be set to a scalar or variate to define the treatment levels, 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 appropriate levels. Alternatively, if you only want to print the design and do not want to save the values, you can specify the levels using LEVELS, and leave TREATMENTS unset.

 The design can also contain controls, or standard treatments. The LEVCONTROLS option can be set to a scalar or variate to define the levels for the control factor. The CONTROLS option can save the factor that is generated. LEVCONTROLS can be omitted if the CONTROLS factor has already been declared with the appropriate levels. If you only want to print the design, you can specify the levels using LEVCONTROLS, and leave CONTROLS unset. When there are controls, zero is used as the level for the control units within the treatment factor, and the level for the treatment units within the control factor. It must not be used as the level for a genuine treatment or control. Similarly, ‘-‘ must not be used for a genuine treatment or control in any labels.

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 NBLOCKSPERLOCATION option can define the number of blocks at each location, and the BLOCKS option can supply a factor to save the values generated for the blocks. Similarly, the NUNITSPERBLOCK option can define the number of units in each blocks, and the UNITS option can supply a factor to save the values generated for those units. Again, you can omit NBLOCKSPERLOCATION and NUNITSPERBLOCK if their corresponding factors have already been defined with the correct numbers of levels, and you do not need to save any of these factors if you only want to print the design,

The MINREPLICATION option specifies the minimum number of times r that each treatment must occur over the whole design. (Each treatment will then occur either r or r+1 times.) If c is the number of locations, r must not be less than c-2 or greater than 2 × c -1. The default for MINREPLICATION is the maximum value, 2 × c -1.

The NCONTROLSPERLOCATION option specifies the number of times that the control treatments occur at each location. This can be set to a scalar if they have the same replication at each location, or to a variate (with the same length as the number of controls) if their replications differ.

The NDUPLICATESPERLOCATION specifies the number of treatments to be duplicated at each location. The possible values for NDUPLICATESPERLOCATION differ according to the number of blocks. You can set PRINT=blocknumbers to see the possibilities. If neither NBLOCKSPERLOCATION nor BLOCKS have been set, the procedure exits. If one of these options has been set, NDUPLICATESPERLOCATION will take the maximum number as its default.

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
 
blocknumbers
to print the feasible numbers of blocks, and corresponding minimum and maximum numbers of duplicated treatments and numbers of plots at each location.

 

The SEED option allows you to 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 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.

The MAXCYCLE option can set limits on the numbers of iterations in the various phases of the optimisation. You can see the numbers of iterations in the relevant phases by printing the report. (This is provided mainly to enable reproducible results to be generated when testing.)

 

Options: PRINT, LEVELS, LEVCONTROLS, NLOCATIONS, NBLOCKSPERLOCATION, NUNITSPERBLOCK, NDUPLICATESPERLOCATION, NCONTROLSPERLOCATION, MINREPLICATION, TREATMENTS, CONTROLS, LOCATIONS, BLOCKS, UNITS, SEED, SPREADSHEET, MAXCYCLE, TIMELIMITS.

Parameters: None

Method

The batch CycDesigN program 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., 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, CDRCPREP, CDNAUGMENTEDDESIGN, CDNBLOCKDESIGN, CDNROWCOLUMNDESIGN, CDNUSERMENUS.

Commands for: Design of experiments.

CAPTION   CAPTION 'CDBPREP example',!t('Design for 120 treatments at 3 locations',\
        'with blocks of size 20'); STYLE=meta,plain
" look at feasible numbers of blocks, and corresponding minimum
  and maximum numbers of duplicated treatments at each location "
CDBPREP [PRINT=blocknumbers; LEVELS=120; NLOCATIONS=3; NUNITSPERBLOCK=20]
" form design with 10 blocks (MAXCYCLE is set to give reproducible output)"
CDBPREP [PRINT=design,report; LEVELS=120; NLOCATIONS=3; NUNITSPERBLOCK=20;\
        MINREPLICATION=5; NBLOCKS=10; NDUPLICATESPERLOCATION=80;\
        SEED=!(951913,901497); TIME=2; MAXCYCLE=!(9999,999999)]
Updated on April 14, 2025

Was this article helpful?