1. Home
  2. AGYOUDENSQUARE procedure

AGYOUDENSQUARE procedure

Generates a Youden square (W. van den Berg).

Options

PRINT = string tokens Controls printed output (design, lambda, list); default is to ask what to print if this is unset in an interactive run, 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 usingANOVA (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

Parameters

NROWS = scalars Specifies the number of rows in the square
NCOLUMNS = scalars Specifies the number of columns (and treatments) in the square
SEED = scalars Seed to be used to randomize each design; a negative value implies no randomization
LAMBDA = scalars Saves the number of times each pair of treatments occurs in the same column
TREATMENTS = factors Identifiers for the treatment factor
ROWS = factors Identifier for the row factor
COLUMNS = factors Identifier for the column factor
STATEMENT = texts Saves a command to recreate each design (useful if the design information has been specified in response to questions from AGYOUDENSQUARE)

Description

AGYOUDENSQUARE generates a Youden square, also known as an incomplete Latin square, using tables in (Cochran & Cox 1957). It is easiest to use interactively. All the information required to generate the squares is then 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 AGYOUDENSQUARE 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 to specify the same information.
The number of rows can be specified by the NROWS parameter, and the number of columns can be specified by the NCOLUMNS parameter. The number of rows must be less than the number of columns. The number of columns defines the number of treatments, and the number of rows defines the number of replicates.

The TREATMENTS, ROWS and COLUMNS and parameters can supply identifiers for the row, column and treatment factors, so that they are accessible outside the procedure.

The SEED parameter can 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).

The PRINT option controls the printed output, with settings:
design
to print the design as a square table of treatment factors tabulated by the row and column factors;
lambda
to the number of times each pair of treatments occurs in the same column; and
list
to print the row, column and treatment factor values as a list.

By default, if you are running Genstat in batch, nothing is printed. If you do not set PRINT when running interactively, AGYOUDENSQUARE will ask what you want to print.

Similarly the ANALYSE option governs whether or not AGYOUDENSQUARE produces a skeleton analysis-of-variance table (containing just source of variation, degrees of freedom and efficiency factors). Again AGYOUDENSQUARE 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 LAMBDA parameter can save the number of times each pair of treatments occurs in the same column. This is given by
LAMBDA = NROWS * (NROWS - 1) / (NCOLUMNS - 1)

Options: PRINT, ANALYSE, COMPLEMENT.
Parameters: NROWS, NCOLUMNS, SEED, TREATMENTS, ROWS, COLUMNS, STATEMENT.

Method

For the simplest case, where the number of rows is one less than the number of columns, the Youden square is formed by constructing the corresponding Latin square (using the AGLATIN procedure) and discarding the final row.
Other squares are provided by tables in Cochran & Cox (1957) pages 522-535. The available combinations are tabulated below.

Number of columns

Number of rows

7

3 or 4

11

5 or 6

13

4 or 9

15

7 or 8

16

6 or 10

19

9 or 10

21

5

25

9

31

6 or 10

37

9

57

8

73

9

91

10

Reference

Cochran, W.G. & Cox, G.M. (1957). Experimental Designs (second edition). Wiley, New York.

See also

Procedures: AGLATIN, AGCROSSOVERLATIN, AGSEMILATIN, AGQLATIN.
Commands for: Design of experiments, Analysis of variance.

Example

CAPTION        'AGYOUDENSQUARE example',\
               'This generates a Youden square with 5 rows and 6 columns.';\
               STYLE=meta,plain
AGYOUDENSQUARE [PRINT=design; ANALYSE=yes] NROWS=5; NCOLUMNS=6;\
               TREATMENTS=Treatments; ROWS=Rows; COLUMNS=Columns; SEED=-1
Updated on February 14, 2023

Was this article helpful?