1. Home
  2. ADPOLYNOMIAL procedure

ADPOLYNOMIAL procedure

Plots single-factor polynomial contrasts fitted by ANOVA (R.W. Payne).

Option

SAVE = ANOVA save structure Save structure (from ANOVA) to provide details of the analysis from which the polynomials are to be plotted; default uses the save structure from the most recent ANOVA

Parameters

XFACTOR = factors Factor over which the polynomial contrasts have been formed
GROUPS = factors or pointers Factor(s) for which different polynomial coefficients should be plotted in the same graph
TRELLISGROUPS = factors or pointers Factor or factors for which different polynomial coefficients should be plotted in a trellis plot
TITLE = texts Title for the graph; default defines a title automatically
YTITLE = texts Title for the y-axis; default ' '
XTITLE = texts Title for the x-axis; default is to use the identifier of the XFACTOR
PENS = variates Defines the pen to use to plot the points and/or line for each group defined by the GROUPS factors

Description

ADPOLYNOMIAL plots polynomials fitted in analyses by the ANOVA directive. (These are included in the treatment model for ANOVA by the functions POL or POLND.) It also plots the corresponding means so that you can see how well the polynomials fit. By default, the polynomials are plotted from 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.

The XFACTOR parameter specifies the factor over whose effects the polynomial contrasts have been fitted. If the analysis contains interactions between the XFACTOR and other factors, you can plot the polynomials for all the combinations of levels of these other factors by setting the GROUPS and TRELLISGROUPS parameters. If only GROUPS is specified, all the polynomials are plotted in a single graph. Alternatively, you can set the TRELLISGROUPS parameter to one or more of the factors to produce a trellis plot; there is then a graph for each of the combination of levels of the trellis factors (and each of these graphs plots the polynomials for every level of the group factors, at the relevant levels of the trellis factors). You should set GROUPS or TRELLISGROUPS to the factor if there is only one factor, or to a pointer containing all the factors if there are several.

The TITLE, YTITLE and XTITLE parameters can supply titles for the graph, the y-axis and the x-axis, respectively. The symbols, colours and line styles that are used in a high-resolution plot are usually set up by ADPOLYNOMIAL automatically. If you want to control these yourself, you should use the PEN directive to define a pen with your preferred symbol, colour and line style, for each of the groups defined by combinations of the GROUPS factors. The pen numbers should then be supplied to ADPOLYNOMIAL, in a variate with a value for each group, using the PENS parameter.

Option: SAVE.

Parameters: XFACTOR, GROUPS, TRELLISGROUPS, TITLE, YTITLE, XTITLE, PENS.

Method

The coefficients of the polynomials are obtained using the APOLYNOMIAL procedure.

See also

Directives: ANOVA, TREATMENTSTRUCTURE.

Procedure: APOLYNOMIAL.

Functions: POL, POLND.

Commands for: Analysis of variance.

Example

CAPTION     'ADPOLYNOMIAL example',!t('Split plot design, see the',\
            'Guide to Genstat, Part 2, Section 4.2.1.'); STYLE=meta,plain
FACTOR      [NVALUES=72; LEVELS=6] Blocks
&           [LEVELS=3] Wplots
&           [LEVELS=4] Subplots
GENERATE    Blocks,Wplots,Subplots
FACTOR      [LABELS=!T('0 cwt','0.2 cwt','0.4 cwt','0.6 cwt')] Nitrogen
&           [LABELS=!T(Victory,'Golden rain',Marvellous)] Variety
VARIATE     Yield
READ        [SERIAL=yes] Nitrogen,Variety,Yield
 4 3 2 1 1 2 4 3 1 2 3 4 3 1 2 4 4 1 2 3 2 1 3 4
 2 3 4 1 4 2 3 1 1 4 2 3 3 4 1 2 1 3 4 2 2 3 4 1
 4 1 3 2 3 4 1 2 3 4 2 1 3 1 4 2 4 3 1 2 1 2 3 4 :
 3 3 3 3 1 1 1 1 2 2 2 2 3 3 3 3 1 1 1 1 2 2 2 2
 2 2 2 2 3 3 3 3 1 1 1 1 3 3 3 3 2 2 2 2 1 1 1 1
 2 2 2 2 1 1 1 1 3 3 3 3 1 1 1 1 2 2 2 2 3 3 3 3 :
156 118 140 105 111 130 174 157 117 114 161 141
104  70  89 117 122  74  89  81 103  64 132 133
108 126 149  70 144 124 121  96  61 100  91  97
109  99  63  70  80  94 126  82  90 100 116  62 
 96  60  89 102 112  86  68  64 132 124 129  89
118  53 113  74 104  86  89  82  97  99 119 121 :
TREATMENTS  Variety*Nitrogen
BLOCKSTRUCTURE Blocks/Wplots/Subplots
VARIATE     [VALUES=0,0.2,0.4,0.6] Nitlev
" Polynomial effects of nitrogen to order 2 (lin. and quad.)."
TREATMENTS  POL(Nitrogen;2;Nitlev) * Variety
" Analysis printing contrasts to order 4 and the aov table."
ANOVA       [PRINT=aov,contrasts] Yield
ADPOLYNOMIAL Nitrogen; GROUPS=Variety
Updated on March 11, 2019

Was this article helpful?