APOLYNOMIAL procedure

Forms the equation for a polynomial contrast fitted by ANOVA (R.W. Payne).


Option

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


Parameters

FACTOR = factors
Factor over which the polynomial contrasts have been formed

LEVELS = variates
Levels used for FACTOR in the ANOVA analysis; if unset, APOLYNOMIAL assume the actual levels defined for FACTOR were used

COEFFICIENTS = pointers
Saves the coefficients of each polynomial

SAVE = ANOVA save structure
Save structure (from ANOVA) to provide details of the analysis from which the equation is to be formed; default uses the save structure from the most recent ANOVA


Description

The ANOVA directive fits polynomial contrasts of the effects of a factor by forming orthogonal polynomials (see Section 9.5 of the Reference Manual). 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.

   The polynomial coefficients can, however, be obtained using procedure APOLYNOMIAL. The FACTOR parameter specifies the factor over whose effects the polynomial contrasts have been fitted. The LEVELS parameter must supply the numerical values that were used for each level of the factor by ANOVA, unless the levels actually defined for the factor were used. 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 equation; the pointer will be given suffixes 0 upwards, corresponding to the powers of the factor in the polynomial. By default, the equation is formed for the contrasts estimated in the most recent analysis performed by ANOVA, but the SAVE parameter can be used to supply the save structure from an earlier analysis to be used instead.


Option: PRINT.

Parameters: FACTOR, LEVELS, 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

c1 = e1 - b21 × e2 - b31 × e3 - b41 × e4

c2 = e2 - b32 × e3 - b42 × e4

c3 = e3 - b43 × e4

c4 = e4