Defines the reference level used e.g. to define the parameterization of regression models

IPRINT = string tokens

Information to be used by default to identify the factors in output (identifier, extra); if this is not set, they will be identified in the standard way for each type of output

Parameters

IDENTIFIER = identifiers

Identifiers of the factors

VALUES = identifiers

Values for each factor, specified as levels or labels

DECIMALS = scalars

Number of decimals for printing levels

CHARACTERS = scalars

Number of characters for printing labels

EXTRA = texts

Extra text associated with each identifier

DREPRESENTATION = scalars or texts

Default format to use when the contents represent dates and times

Description

Factors are used to indicate groupings of units. The commonest occurrence is in designed experiments. For example, suppose you had 12 observations in an experiment, the first four on one treatment, the next four on a second treatment, and the last four on a third. Then you could record which treatment went with which observation by declaring a factor with the values

1,1,1,1,2,2,2,2,3,3,3,3

Thus a factor is a vector that has only a limited set of possible values, one for each group; this limitation distinguishes factors from variates and texts. In Genstat, the groups are referred to by numbers known as levels. Unless otherwise specified these are the integers 1 up to the number of groups, as in our example; however, you can specify any other numbers by the LEVELS option of the FACTOR directive. You can also give textual labels to the groups, using the LABELS option of FACTOR: these might, for example, be mnemonics for the biochemical names of treatments in an experiment.

Use of the VALUES parameter to assign values has the advantage that you can refer either to labels or to levels; the VALUES option lets you refer only to levels. So, to summarize, the LEVELS and LABELS options list the groups that can occur, while the VALUES option or parameter specifies which groups actually do occur, and in what pattern over the units.

Our simple explanatory example would therefore be:

FACTOR [LEVELS=3; VALUES=4(1...3)] Treatment

Other examples are:

FACTOR [LEVELS=!(2,4,8,16); VALUES=8,4,2,16,4,2,16,8,2] Dose

FACTOR [LABELS=!T(male,female)] Sex;VALUES=!T(4(male,female))

FACTOR [LEVELS=!(0,2.5,5); LABELS=!T(none,standard,double)]\

Rate; VALUES=!(0,5,2.5,5,0,2.5)

Notice that if we had assigned the values using the VALUES option in the second of these, we would have needed to use the (numerical) levels:

FACTOR [LABELS=!T(male,female); VALUES=4(1,2)] Sex

Conversely, in the VALUES parameter in the declaration of Rate, we can use either the labels or the levels; so the following statement gives Rate exactly the same values:

FACTOR [LEVELS=!(0,2.5,5); LABELS=!T(none,standard,double)]\

Rate; VALUES=!T(none,double,standard,double,none,standard)

The DECIMALS parameter lets you define a number of decimal places to be used by default when the levels of each factor are printed. The CHARACTERS parameter allows you to define the number of characters to be printed by default when the labels of each factor are printed. You can associate a text of extra annotation with each factor using the EXTRA parameter.

The DREPRESENTATION parameter allows a scalar or a single-valued text to be specified for each factor to indicate that the factor stores dates and times, and to define a format to be used for these, by default, when they are printed; details are given in the description of the PRINT directive.

In some contexts Genstat needs to treat one of the levels of a factor as a reference level. For example, in regression with groups, the parameterization used by Genstat usually involves comparisons of the second and subsequent levels of the grouping factor with its first level. This can be changed by setting the REFERENCELEVEL option to a level other than the first level when the grouping factor is declared.

If the MODIFY option is set to yes any existing attributes and values of the factors are retained if still appropriate; otherwise these are lost.

The IPRINT option can be set to specify how the factors will be identified in output. If IPRINT is not set, they will be identified in whatever way is usual for the section of output concerned. For example, the PRINT directive generally uses their identifiers (although this can be changed using the IPRINT option of PRINT itself).