1. Home
  2. AUGRAPH procedure

AUGRAPH procedure

Plots tables of means from AUNBALANCED (R.W. Payne).

Options

GRAPHICS = string token Type of graph (highresolution, lineprinter); default high
METHOD = string token What to plot (means, lines, data, barchart, splines); default mean
XFREPRESENTATION = string token How to label the x-axis (levels, labels); default labels uses the XFACTOR labels, if available
PSE = string token What to plot to represent variation (differences, lsd, means, allmeans); default diff
COMBINATIONS = string token Factor combinations for which to form predicted means (present, estimable); default esti
ADJUSTMENT = string token Type of adjustment to be made when predicting means (marginal, equal, observed); default marg
LSDLEVEL = scalar Significance level (%) to use for least significant differences; default 5
DFSPLINE = scalar Number of degrees of freedom to use when METHOD=splines
YTRANSFORM = string tokens Transformed scale for additional axis marks and labels to be plotted on the right-hand side of the y-axis (identity, log, log10, logit, probit, cloglog, square, exp, exp10, ilogit, iprobit, icloglog, root); default iden i.e. none
PENYTRANSFORM = scalar Pen to use to plot the transformed axis marks and labels; default * selects a pen, and defines its properties, automatically
KEYMETHOD = string token What to use for the key descriptions when there are GROUPS (labels, namesandlabels); default name
PLOTTITLEMETHOD = string token What to use for the titles of the plots when there are TRELLISGROUPS (labels, namesandlabels); default name
PAGETITLEMETHOD = string token What to use for the titles of the pages when there are PAGEGROUPS (labels, namesandlabels); default name
USEAXES = string token Which aspects of the current axis definitions of window 1 to use (none, limits, marks, mpositions, mlower%, mupper%, nsubticks,); default none
SAVE = regression save structure Save structure to provide the table of means; default uses the save structure from the most recent AUNBALANCED analysis (provided no other regression analysis has been done in the interim)

Parameters

XFACTOR = factors Factor providing the x-values for each plot
GROUPS = factors or pointers Factor or factors identifying groups of points in each plot; by default chosen automatically
TRELLISGROUPS = factors or pointers Factor or factors specifying the different plots of a trellis plot of a multi-way table
PAGEGROUPS = factors or pointers Factor or factors specifying plots to be displayed on different pages
NEWXLEVELS = variates Values to be used for XFACTOR instead of its existing levels
TITLE = texts Title for the graph; default defines a title automatically
YTITLE = texts Title for the y-axis; default is to use the identifier of the y-variate, or to have no title if this is unnamed
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

AUGRAPH plots tables of predicted means from an analysis by AUNBALANCED. The SAVE option can be set to the save structure from the analysis from which the means should be taken. If SAVE is not set, the means will be from the most recent analysis by AUNBALANCED; however, none of the Genstat regression directives (MODEL, TERMS, FIT, ADD, DROP and so on) must then have been used in the interim.

In its simplest form, the behaviour of AUGRAPH depends on the model. If the treatment model contains only main effects, it plots the means for the first factor in the model. Otherwise it looks for the first treatment term involving two factors; it then plots the means with one of these factors as the x-axis, and the second as a grouping factor with levels identified by different plotting colours and symbols. The means are predicted by the AUKEEP procedure using the averaging and adjustment methods specified by the COMBINATIONS and ADJUSTMENT options; see AUKEEP for details.

Usually, each mean is represented by a point. However, with high-resolution plots, the METHOD option can be set to lines to draw lines between the points, or data to draw just the lines and then also plot the original data values, or barchart to plot the means as a barchart, or splines to plot the points together with a smooth spline to show the trend over each group of points. The DFSPLINE specifies the degrees of freedom for the splines; if this is not set, 2 d.f. are used when there are up to 10 points, 3 if there are 11 to 20, and 4 for 21 or more. The GRAPHICS option controls whether a high-resolution or a line-printer graph is plotted; by default GRAPHICS=high.

The PSE option specifies the type of error bar to be plotted with the means, with settings:

    differences average standard error of difference;
    lsd average least significant difference;
    means average effective standard error for the means;
    allmeans plots plus and minus the effective standard error around every mean.

The LSDLEVEL option sets the significance level (%) to use for the least significant differences (default 5). The allmeans setting is often unsuitable for plots other than barcharts when there are GROUPS, as the plus/minus e.s.e. bars may overlap each other.

You can define the table of means to plot explicitly, by specifying its classifying factors using the XFACTOR, GROUPS, TRELLISGROUPS and PAGEGROUPS parameters. The XFACTOR parameter defines the factor against whose levels the means are plotted. With a multi-way table, there will be a plot of means against the XFACTOR levels for every combination of levels of the factors specified by the GROUPS, TRELLISGROUPS and PAGEGROUPS parameters. The GROUPS parameter specifies factors whose levels are to be included in a single window of the graph. So, for example, if you specify

AUGRAPH [METHOD=line] XFACTOR=A; GROUPS=B

AUGRAPH will produce plot the means in a single window with factor A on the x-axis, and a line for each level of the factor B. You can set GROUPS to a pointer to specify several factors to define groups. For example

POINTER [VALUES=B,C] Groupfactors

AUGRAPH [METHOD=line] XFACTOR=A; GROUPS=Groupfactors

to plot a line for every combination of the levels of factors B and C. Similarly, the TRELLISGROUPS option can specify one or more factors to define a trellis plot. For example,

AUGRAPH [METHOD=line] XFACTOR=A; GROUPS=B; TRELLISGROUPS=C

will produce a plot for each level of C, in a trellis arrangement; each plot will again have factor A on the x-axis, and a line for each level of the factor B. Likewise, the PAGEGROUPS parameter can specify factors whose combinations of levels are to be plotted on different pages. So

AUGRAPH [METHOD=line] XFACTOR=A; GROUPS=B; PAGEGROUPS=C

will produce a plot for each level of C, but now on separate pages. Multi-way tables can plotted even if the corresponding model term was not in the ANOVA analysis. For example you can plot a two-way table even if the analysis contained only the main effects of the two factors; however, the lines will then all be parallel and no standard errors or LSDs can be included.

The NEWXLEVELS parameter enables different levels to be supplied for XFACTOR if the existing levels are unsuitable. If XFACTOR has labels, these are used to label the x-axis unless you set option XFREPRESENTATION=levels.

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 AUGRAPH 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 AUGRAPH, in a variate with a value for each group, using the PENS parameter.

The YTRANSFORM option allows you to include additional axis markings, transformed onto another scale, on the right-hand side of the y-axis. Suppose, for example, suppose you have analysed a variate of percentages that have been transformed to logits. You might then set YTRANSFORM=ilogit (the inverse-logit transformation) to include markings in percentages alongside the logits. The settings are the same as those of the TRANSFORM parameter of AXIS (which is used to add the markings). You can control the colours of the transformed marks and labels, by defining a pen with the required properties, and specifying it with the PENYTRANSFORM option. Otherwise, the default is to plot them in blue.

When there are GROUPS, the KEYMETHOD controls whether to use the factor names with their labels (or levels for factors with no labels) or just the labels (or levels) in the key descriptions. The default is to use the names and the labels (or levels). Similarly, the PLOTTITLEMETHOD specifies what to use for the titles of the plots when there are TRELLISGROUPS, and the PAGETITLEMETHOD specifies what to use for the titles of the plots when there are PAGEGROUPS. You can set KEYMETHOD=* to have no key at all.

The USEAXES option allows you to control various aspects of the axes. First you need to use the XAXIS and YAXIS directives to define them for window 1. Then specify which of the aspects of the axes in window 1 are to be used by DTABLE, by specifying USEAXES with the following settings:

limits y- and x-axis limits (LOWER and UPPER parameters);
marks location and labelling of the tick marks (MARKS, LABELS, LDIRECTION, LROTATION, DECIMALS, DREPRESENTATION, and VREPRESENTATION parameters);
mpositions positions of the tick marks (MPOSITION parameter);
mlower% how large a margin to set between the lowest x and y values and the lower values of their axes, expressed as a percentage of the range of their values, if not set explicitly by the axis limits (MLOWER% parameter);
mupper% how large how large a margin to set between the highest x and y values and the upper values of their axes, expressed as a percentage of the range of their values, if not set explicitly by the axis limits (MUPPER% parameter); and
nsubticks number of subticks per interval (NSUBTICKS parameter).

By default none are used.

Options: GRAPHICS, METHOD, XFREPRESENTATION, PSE, COMBINATIONS, ADJUSTMENT, LSDLEVEL, DFSPLINE, YTRANSFORM, PENYTRANSFORM, KEYMETHOD, PLOTTITLEMETHOD, PAGETITLEMETHOD, USEAXES, SAVE.
Parameters: XFACTOR, GROUPS, TRELLISGROUPS, PAGEGROUPS, NEWXLEVELS, TITLE, YTITLE, XTITLE, PENS.

See also

Procedures: AUNBALANCED, AUDISPLAY, AUPREDICT, AUMCOMPARISON, AUKEEP, RGRAPH, VGRAPH.

Commands for: Analysis of variance.

Example

CAPTION 'AUGRAPH example',\
        'Data from Genstat 5 Release 1 Reference Manual, page 340.';\
        STYLE=meta,plain
FACTOR  [NVALUES=36; LEVELS=3; VALUES=12(1...3)] Block
FACTOR  [NVALUES=36; LABELS=!t(baresoil,emerald,emergo)] Leachate
&       [LABELS=!t('1','1/4','1/16','1/64')] Dilution
VARIATE [NVALUES=36] Nhatch,Nnohatch
READ    Leachate,Dilution,Nhatch,Nnohatch
  1           2         109         318
  3           4          54         350
  3           1           *         415
  2           2         783         212
  3           3         652        1375
  2           4         490         816
  1           3          95        1219
  2           1        1012          66
  1           4         166         943
  3           2        1059         313
  1           1         257        1006
  2           3        1058         234
  2           4         507        1119
  1           2         194         840
  1           3         175        1707
  1           1         326         609
  3           4         142         980
  2           3         286         230
  3           2         546         313
  2           2           *         301
  2           1        2471         112
  3           3          76         489
  1           4         208         503
  3           1           *         325
  1           1         322         913
  1           2         255        2246
  3           2        1774        1446
  2           2         999         193
  2           4         388        1836
  3           4         221        1800
  1           3         220        1902
  2           1        2821         187
  3           1        1486         463
  3           3         717        1473
  1           4         143         941
  2           3         968         550 :
CALCULATE          Logit%h = LOG(Nhatch/Nnohatch)
BLOCKSTRUCTURE     Block
TREATMENTSTRUCTURE Leachate*Dilution
AUNBALANCED        Logit%h
AUGRAPH
Updated on February 6, 2023

Was this article helpful?