AGDESIGN procedure
Generates generally balanced designs (R.W. Payne).
Options
Parameters
Description
AGDESIGN generates the factors and, if necessary, pseudo-factors required to define a generally balanced design. It also sets the block and treatment formulae (using the BLOCKSTRUCTURE and TREATMENTSTRUCTURE directives) to allow the design to be analysed by ANOVA. It can be accessed most conveniently through interactive GenStat design system, using the procedure DESIGN.
AGDESIGN relies upon a backing-store subfile that contains a repertoire of available designs, together with the information required to form them. FILENAME has a default file containing four subfiles.
FACTORIAL - factorial designs (with blocking): these have several treatment factors and a single blocking factor (giving strata for blocks and plots within blocks); the blocks are too small to contain a complete replicate of the treatment combinations and so various interaction are confounded with blocks.
LATTICE - lattice designs: designs for a single treatment factor with number of levels that is the square of some integer k; the design has replicates, each containing k blocks of k plots, and different treatment contrasts can be confounded with blocks in each replicate.
LATTSQ - lattice squares: these are similar to lattices except that the blocking structure with the replicates has rows crossed with columns; again different treatment contrasts can be confounded with the rows and columns in each replicate.
LATIN - Latin squares: designs are available for 3 to 14 treatments; several different orthogonal squares are available for most of these so, for example, Graeco Latin squares can be formed by using a different square for each of the two treatment factors.
If the default FILENAME is being used, the usual abbreviation rules are used to match SUBFILE with the names of the subfiles in the default file.
The backing-store file can be created by a procedure called FDESIGNFILE. This requires a data file, details of whose format can be obtained by setting option PRINT=filestructure when running FDESIGNFILE. You can thus provide additional files of designs which can be accessed by setting the FILENAME and SUBFILE options as appropriate.
AGDESIGN has two other options. The PRINT option can be set to design to print the plan of the design. By default, if you are running GenStat in batch, the plan is not printed. If you do not set PRINT when running interactively, AGDESIGN will ask whether or not you wish to print the design. The other setting catalogue lists the designs in the subfile. Similarly the ANALYSE option governs whether or not AGDESIGN produces a skeleton analysis-of-variance table (containing just source of variation, degrees of freedom and efficiency factors). Again AGDESIGN 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 information required to select the design and give identifiers to its factors can be defined using the parameters of AGDESIGN. In an interactive run, AGDESIGN will ask questions to obtain any necessary information that is not supplied in this way; when running in batch, if any of the required information has not been specified, AGDESIGN will terminate with a warning message.
It is thus easiest to use AGDESIGN interactively. Then only the SUBFILE option need be set (assuming that you are happy to use the standard default design file), and the other information will be obtained by (clearly explained) questions. You need set the parameters only if you wish to anticipate some of the questions, or if you wish to use AGDESIGN 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 DESIGN parameter can supply a variate whose first value selects the "type" of design: for example, in the LATTICE subfile, this would select between a 3×3 lattice, a 4×4 lattice, and so on. Some of these designs are available in several different "versions": for example, in lattice designs there are several ways of defining which treatment contrasts are to be confounded with blocks. If there is more than one version, the second and subsequent values of the DESIGN variate indicate which version, or versions, are required. These need not be distinct so, for example, you can replicate a basic design several times. If the variate has a single value, AGDESIGN will select the first version.
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. Similarly the BLOCKFACTORS parameter can specify a pointer to define the identifiers for the block factors in the basic design. If you have requested several versions, or several replicates, of the basic design AGDESIGN will also need a factor to represent the replicates. The identifier of this factor can be supplied using the REPLICATEFACTOR parameter. Partially balanced designs, such as lattices, will require pseudo-factors in the treatment formula to enable the design to be analysed by ANOVA. Identifiers can be supplied for these using the PSEUDOFACTORS parameter.
The UNITLABELS parameter can specify a variate to store a unique number to label each of the plots in the design. In the first replicate (or version) in the generated design, the variate contains the numbers one up to the number of plots per replicate. The second replicate (if any) contains these numbers plus the smallest power of ten greater than the number of plots per replicate, the third replicate contains the numbers plus twice this power of ten, and so on.
The SEED parameter allows you to specify a seed to randomize the design. In a batch run, this has a default of -1, to suppress randomization. If SEED is unset in an interactive run, you will be asked to provide a seed (and again a negative value will leave the design unrandomized).
Options: PRINT, ANALYSE, FILENAME, SUBFILE.
Parameters: DESIGN, TREATMENTFACTORS, BLOCKFACTORS, PSEUDOFACTORS, REPLICATEFACTOR, UNITLABELS, SEED, STATEMENT.
Method
The QUESTION directive is used to obtain the details of the required design. The design is then generated using GENERATE and the other standard GenStat directives for calculation and manipulation.