Randomizes and prints an experimental design (R.W. Payne).
|Allows the (randomized) design to be printed; (
||Defines the block factors according to which the randomization is to be carried out; default takes the existing specification as defined by the
||(Block) factors whose levels are not to be randomized|
||Seed to generate the random numbers used to define the randomization; default 0|
||Whether to randomly permute treatment factor levels (
||Vectors whose values are to be randomized; default is to use the factors occurring in the formula (if any) specified by the most recent
||Vectors to store the randomized values; by default these overwrite the values in the original vectors|
ARANDOMIZE provides a convenient way of randomizing the treatment allocations in an experimental design. It has several advantages over the
RANDOMIZE directive (which is used inside the procedure).
First of all, the
BLOCKSTRUCTURE option, which (as in
RANDOMIZE) specifies the block model formula to indicate how the randomization is to take place, will use any setting that has already been defined by the
BLOCKSTRUCTURE directive as its default. Moreover, the formula need not index all the units of the design, as would be required by
RANDOMIZE; if necessary
ARANDOMIZE will set up an extra factor
_units_ simular to the factor
*units* used by
ARANDOMIZE allows the original (unrandomized) values to be retained. There are two parameters:
OLDVECTOR to specify the factors or variates to be randomized, and
NEWVECTOR to allow new structures to be supplied to store the randomized values. If no
NEWVECTOR is specified, the randomized values replace the original values of the corresponding
OLDVECTOR. By default,
NEWVECTOR is assumed to contain the list of factors in the model formula (if any) specified by the previous
The levels of the treatment factors can be randomized by setting option
ARANDOMIZE then randomly permutes the numbering of the levels of each treatment factor on the units of the design. There is also a
design to print the design. The other two options,
SEED, are as in
EXCLUDE lists block factors whose levels are not to be permuted during the randomization; for example the period factor might need to be excluded in the randomization of a trial to study carry over effects.
SEED defines the seed used to generate the random numbers used for the randomization. The default of zero continues the existing sequence of random numbers if
RANDOMIZE has already been used in the current Genstat job. If
RANDOMIZE has not yet been used, Genstat picks a seed at random.
GET directive is used to access any existing settings defined by the
AFUNITS, if necessary, forms the extra
_units_ factor, and
DUPLICATE generates new copies of the original vectors, if these are to be kept, before
RANDOMIZE is used to produce the randomized values. Finally, if required,
PDESIGN is used to print the design.
RESTRICT can be used, as usual, to restrict the set of units to be randomized.
CAPTION 'ARANDOMIZE example',!t('Split plot design, see the ',\ 'Guide to Genstat, Part 2, Section 4.2.1.'); STYLE=meta,plain FACTOR [NVALUES=72; LEVELS=6] Block & [LEVELS=3] Wplot & [LEVELS=4] Subplot & [LABELS=!T('0 cwt','0.2 cwt','0.4 cwt','0.6 cwt')] Nitrogen & [LEVELS=3; LABELS=!T(Victory,'Golden rain',Marvellous)] Variety GENERATE Block,Wplot,Subplot & Block,Variety,Nitrogen BLOCKSTRUCTURE Block/Wplot/Subplot TREATMENTSTRUCTURE Variety*Nitrogen ARANDOMIZE [PRINT=design; SEED=12345]