AFLABELS procedure

Forms a variate of unit labels for a design (R.W. Payne).


Options

UNITLABELS = variate
Stores the labels

MAXDIGIT = scalar
Number of available digits; default 8


Parameters

FACTOR = factors
Factors indexing the units of the design; if this is unset, the factors from the most recent BLOCKSTRUCTURE command are used

NEWLEVELS = variates
Allows new levels to be specified for each FACTOR; if this is unset, uses the levels already defined for the factor


Description

AFLABELS forms a variate, specified using the UNITLABELS option, containing a unique code for each unit of a design. By default, it is assumed that the codes can be up to eight digits long, but this can be modified using the MAXDIGIT option.

   The units are assumed to be indexed by a set of factors which can be specified by the FACTOR parameter; if this is not set, AFLABELS takes those from the most recent BLOCKSTRUCTURE command (if any). By default, the codes are formed from the levels of the factors but, if these are unsuitable, alternative levels can be supplied using the NEWLEVELS parameter. In particular, AFLABELS requires the levels (or new levels) all the be positive integers.


Options: UNITLABELS, MAXDIGIT.

Parameters: FACTOR, NEWLEVELS.


Method

The codes are formed by ordinary arithmetic so that the initial digits are the levels of the first indexing factor, then the second, and so on. If there is too much information to fit within the MAXDIGIT limit, AFLABELS tries to decrease the sizes of the codes by successively combining the final pairs of factors.