NLCONTRASTS procedure
Fits nonlinear contrasts to quantitative factors in ANOVA (R.C. Butler).
Options
Parameters
Description
The ANOVA directive allows linear contrasts to be fitted and incorporated into the analysis-of-variance table. NLCONTRASTS extends this to enable nonlinear contrasts to be fitted to the effects of a quantitative factor and its interaction with another factor. The analysis should include both main effects and the interaction between the factors. The procedure will work for any block structure providing each treatment term is estimated entirely within one stratum. The result is similar to ANOVA with a polynomial contrast, but with slightly different partitions of the treatment sums of squares. The main effect is partitioned into the sum of squares for the "Curve" and the remainder or "Deviations". The interaction sum of squares is partitioned into the sum of squares due to curves with "Common Nonlinear" parameters for the levels of the non-quantitative factor, and the extra sum of squares due to having "Separate Curves" for each level of that factor, and the remaining sum of squares which again represents "Deviations".
The BLOCKSTRUCTURE and TREATMENTSTRUCTURE directives must be used in the normal way before the procedure is called, and any COVARIATES should also be defined first. The structure of the analysis-of-variance table is then accessed from inside the procedure. The Y parameter defines the variate to be analysed, and the form of nonlinear contrast is defined using the CURVE option of the procedure. The same choices of curves are available as for FITCURVE. There are four other options, PRINT, FPROBABILITY, PSE, and WEIGHT, which are exactly as for ANOVA. The XFACTOR parameter defines the factor to which the contrasts are to be fitted, and the XLEVELS parameter may be used to define x values for the regressions if the levels already defined for the factor are unsuitable. The GROUPFACTOR parameter defines the factor whose interaction with XFACTOR is to be assessed. The final three parameters CONTRASTS, SECONTRASTS and DFCONTRASTS can be used to save the parameter estimates for the contrasts, their standard errors and degrees of freedom respectively.
Options: PRINT, CURVE, FPROBABILITY, PSE, WEIGHT.
Parameters: Y, XFACTOR, XLEVELS, GROUPFACTOR, CONTRASTS, SECONTRASTS, DFCONTRASTS.
Method
ANOVA is used to obtain the basic analysis-of-variance table and the sums of squares for the treatment terms. FITCURVE is then used with the treatment means to fit three sets of curves: a single curve, curves with common nonlinear parameters, and entirely separate curves. The deviances and degrees of freedom obtained from these are used in conjunction with the treatment sums of squares to calculate the contrast sums of squares and degrees of freedom. Further details are given by Butler & Brain (1992). New lines for the analysis-of-variance table are then constructed using PRINT and EDIT, and these lines are then inserted into the table (saved in a text with ADISPLAY) using EDIT. The standard errors for the parameter estimates and deviances are based on the Residual Mean Square for the appropriate stratum. Standard errors for deviations are calculated using the method in the Guide to GenStat, Part 2, Section 4.5.
Action with
RESTRICT
If the Y variate is restricted, the procedure will use only the units not excluded by the restriction.
Reference
Butler, R.C. & Brain, P. (1993). Nonlinear Contrasts in ANOVA. Genstat Newsletter, 29, 20-27.