TREATMENTSTRUCTURE directive

Specifies the treatment terms to be fitted by subsequent ANOVA statements.


No options


Parameter

    formula
Treatment formula, specifies the treatment model terms to be fitted by subsequent ANOVAs


Description

The TREATMENTSTRUCTURE directive defines the treatment formula which specifies treatment, or systematic, terms to be fitted in subsequent ANOVA statements. For a simple one-way analysis of variance this has the form

TREATMENTSTRUCTURE Tfac

where Tfac is a factor which indicates which treatment was received by each unit in the design. Most experiments, however, are devised to study several treatment factors. For these factorial experiments TREATMENTSTRUCTURE specifies a model formula to define the model terms to be fitted. Each model term will then have its own line in the analysis-of-variance table and, for example, will have a table of means.

   Initially in a job, there is no treatment formula. This situation can be restored by a TREATMENTSTRUCTURE directive with a null setting:

TREATMENTSTRUCTURE

   In its simplest form, a model formula is a list of model terms, linked by the operator "+". For example,

A + B

is a formula containing two terms, A and B, representing the main effects of factors A and B respectively. Higher-order terms (like interactions) are specified as series of factors separated by dots, but their precise meaning depends on which other terms the formula contains, as we explain below. The other operators provide ways of specifying a formula more succinctly, and of representing its structure more clearly.

   The crossing operator * is used to specify factorial structures. For example, the treatment formula

TREATMENTSTRUCTURE Nitrogen * Sulphur

is expanded automatically by GenStat to become the formula

Nitrogen + Sulphur + Nitrogen.Sulphur

which has three terms: Nitrogen for the nitrogen main effect, Sulphur for the main effect of sulphur, and Nitrogen.Sulphur for the nitrogen by sulphur interaction. Higher-order terms like Nitrogen.Sulphur represent all the joint effects of the factors Nitrogen and Sulphur that have not been removed by earlier terms in the formula. Thus here it represents the interaction between nitrogen and sulphur as both main effects have been removed.

   The other most-commonly used operator is the nesting operator (/). This occurs most often in block models (specified by the BLOCKSTRUCTURE directive). For example, the formula

Litter / Rat

is expanded to become the formula

Litter + Litter.Rat

This could define the block model for a design in which there are several litters of rats. As the formula contains no "main effect" for rat, the term Litter.Rat represents rat-within-litter effects (that is the differences between individual rats after removing any overall similarity between rats that belong to the same litter).

   A formula can contain more than one of these operators. The three-factor factorial model

A * B * C

becomes

A + B + C + A.B + A.C + B.C + A.B.C

and the nested structure

Block / Wplot / Subplot

which specifies the block model of a split-plot design becomes

Block + Block.Wplot + Block.Wplot.Subplot

The operators can also be mixed in the same formula. In general, if l and m are two model formulae:

l * m = l + m + l.m

l / m = l + fac(l).m

(where l.m is the sum of all pairwise dot products of a term in l and a term in m, and fac(l) is the dot product of all factors in l). For example:

(A + B) * (C + D) = (A + B) + (C + D) + (A + B).(C + D)

                  = A + B + C + D + A.C + A.D + B.C + B.D

(A + B)/C = A + B + fac(A + B).C = A + B + A.B.C

   The other important operator for ANOVA is the pseudo-factorial operator //. This allows you to partition an unbalanced treatment term into pseudo-terms, which are each balanced.

   Contrasts can be fitted by putting a function of a factor into the treatment formula, instead of the factor itself. Polynomial contrasts can be specified using the POL or POLND functions. Other, user-defined regression models can be defined using the REG or REGND functions. COMPARISON, the other function relevant to ANOVA allows comparisons to be calculated between levels of the factor.

 

Options: none.

Parameter: unnamed.