1. Home
  2. AMERGE procedure

AMERGE procedure

Merges extra units into an experimental design (R.W. Payne).

Option

SORT = string token Whether to sort the factors afterwards (no, yes); default no

Parameters

FACTOR = factors Factors to which the new units are to be added
NEWUNITS = factors, variates or scalars Extra units to be added to each factor

Description

AMERGE provides a convenient way of adding extra units into an experimental design. In the simplest case, this can be used to add control treatments to an already generated factorial design. More complicated uses may join together two completely different designs, for example a randomized block design to a balanced incomplete block design. These are both illustrated in the example.

The factors of the design which is to be augmented are specified using the FACTOR parameter, and the units that are to be added to each one are specified by the NEWUNITS parameter. The same number of units must be added to every FACTOR, and their levels (and labels) will be extended, if necessary, according to those defined on the units that are added. New units of a factor that are to receive different levels should be specified in a factor or a variate. Alternatively, if every new unit is to receive the same level of the FACTOR, NEWUNIT can be set to a scalar.

The SORT option can be set to yes to request that the FACTOR values are sorted after the new units have been added. Otherwise, they are simply placed at the end of the existing values.

Option: SORT.

Parameters: FACTOR, NEWUNITS.

Method

AMERGE uses the standard Genstat manipulation facilities.

Action with RESTRICT

Any restrictions on the vectors are ignored.

See also

Procedures: APPEND, APRODUCT.

Commands for: Design of experiments, Calculations and manipulation.

Example

CAPTION  'AMERGE example',\
         '1) add a control treatment to an existing design'; STYLE=meta,plain
FACTOR   [NVALUES=16; LEVELS=4] Block,Plot
&        [LABELS=!t(a,b,c,d)] Treat
GENERATE Block,Plot
&        Treat
FACTOR   [LABELS=!t(control); LEVELS=!(5); VALUES=4(5)] Control
&        [LABELS=!t('plot 5')] Plot5
AMERGE   Block,Plot,Treat; !(1...4),Plot5,Control
PRINT    Block,Plot,Treat
CAPTION  '2) Merge a randomized block with a balanced incomplete block design'
FACTOR   [LEVELS=3; NVALUES=9] Block,Plot,Treat
GENERATE Block,Plot
&        Treat
FACTOR   [LEVELS=3; NVALUES=6] BibBlock
&        [LEVELS=!(4,5)] BibPlot
GENERATE BibBlock,BibPlot
FACTOR   [LEVELS=3; VALUES=1,2, 1,3, 2,3] BibTreat
AMERGE   [SORT=yes] Block,Plot,Treat; BibBlock,BibPlot,BibTreat
PRINT    Block,Plot,Treat
Updated on March 11, 2019

Was this article helpful?