APOLYNOMIAL procedure

Options

Whether to print the equation of the polynomial (equation); default equa

SAVE = ANOVA save structure

Save structure (from ANOVA) to provide details of the analysis from which the equations are to be formed; default uses the save structure from the most recent ANOVA

Parameters

TERMS = formula

Model terms whose polynomial equations are required

COEFFICIENTS = pointers

Saves the coefficients of each polynomial

Description

The ANOVA directive fits polynomial contrasts of the effects of a factor by forming orthogonal polynomials (see Section 4.5 of the Guide to the Genstat Command Language, Part 2 Statistics). This allows the sums of squares for the factor to be partitioned into the amount that can be explained by a linear relationship, then the extra amount that can be explained if the relationship is quadratic, then the extra amount given by a cubic relationship, and so on. As a result, though, the estimates that are produced by ANOVA are the regression coefficients of the orthogonal polynomials, not the coefficients of the polynomial equation. ANOVA can also estimate interactions between the (orthogonal) polynomial contrasts and other factors.

The polynomial coefficients can, however, be obtained using procedure APOLYNOMIAL. The TERMS parameter specifies the treatment terms whose equations are required. Each term must contain no more than one factor with a polynomial function (POL or POLND), and no factors with regression or comparison functions (REG, REGND or COMPARISON); otherwise it is ignored. If TERMS is not set, APOLYNOMIAL takes the full treatment model (see TREATMENTSTRUCTURE).

APOLYNOMIAL usually prints the equation, but you can set option PRINT=* to suppress this. The COEFFICIENTS parameter can supply a pointer to save the coefficients of the equations. The pointer will contain a pointer for each term. These are given suffixes 0 upwards, corresponding to the powers of the factor in each polynomial.

By default, the equation is formed for the contrasts estimated in the most recent analysis performed by ANOVA, but the SAVE option can be used to supply the save structure from an earlier analysis to use instead.

Option: PRINT.

Parameters: FACTOR, LEVELS, GROUPS, COEFFICIENTS, SAVE.

Method

APOLYNOMIAL first needs to duplicate the process of forming the orthogonal polynomials, regressing each power of the factor levels on the lower powers. Suppose, for example, a fourth-order polynomial was fitted, and the orthogonal polynomials were given by

p1 = y

p2 = y2 – b21 × y

p3 = y3 – b31 × y – b32 × y2

p4 = y4 – b41 × y – b42 × y2 – b41 × y3

and that the estimated coefficients of the orthogonal polynomials were e1, e2, e3 and e4. The coefficients of the polynomial equation are then calculated as