AGRAPH procedure

Plots one- or two-way tables of means from ANOVA (R.W. Payne).


Options

GRAPHICS = string
Type of graph (highresolution, lineprinter); default high

METHOD = string
What to plot: means to plot just the means, lines to plot the means joined by lines, data to plot lines joining the mean values and points representing the original data, and barchart to plot the means in a bar chart (means, lines, data, barchart); default mean

XFREPRESENTATION = string
How to label the x-axis (levels, labels); default labels uses the XFACTOR labels, if available

PSE = string
What to plot to represent variation (differences, lsd, means, allmeans); default diff

LSDLEVEL = scalar
Significance level (%) to use for least significant differences; default 5

SAVE = ANOVA or regression save structure
Save structure to provide the table of means if the MEANS parameter is unset; default uses the save structure from the most recent ANOVA


Parameters

XFACTOR = factors
Factor providing the x-values for each plot; by default this is chosen automatically

GROUPS = factors
Factor identifying the different lines from a two-way table; by default chosen automatically

MEANS = tables
Table of means to be plotted; default obtains the table from the structure specified by the SAVE parameter or, if this too is unset, from the most recent ANOVA

BAR = scalars or tables
Scalar defining the length of error bar to be plotted to indicate the variability of the means or table defining the variability of each mean; default calculates the standard error for differences between means, if possible, from the SAVE structure (or from the most recent ANOVA) using the method specified by the PSE option

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 ' '

XTITLE = texts
Title for the x-axis; default is to use the identifier of the XFACTOR

BARDESCRIPTION = texts
Information to label a bar provided by the BAR parameter; default ''


Description

AGRAPH plots tables of means. In its simplest form, if none of the options nor parameters are specified, AGRAPH plots a high-resolution graph for the first two-way table of means in the most recent ANOVA, or for the first one-way table if there were no two-way tables. Usually, each mean is represented by a point (using pens 1, 2, and so on for each level in turn of the second factor). 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. The GRAPHICS option controls whether a high-resolution or a line-printer graph is plotted; by default GRAPHICS=high.

   The MEANS parameter allows the table of means to be specified explicitly. If this is not set, AGRAPH obtains the table automatically from ANOVA - from the save stucture specified by the SAVE option or from the most recent analysis if this too is unset. The BAR parameter can specify error bars (such as a standard error for differences between the means) to be plotted on the graph. If this is not specified, AGRAPH forms the bars from the SAVE structure (or from the most recent ANOVA) using the method specified by the PSE option, as follows:

    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 when a two-way table is plotted as a graph (the plus/minus e.s.e. bars may overlap each other), and is not allowed when a two-way table is plotted as a barchart. If BAR is set, BARDESCRIPTION can provide a description to label the bar on the graph. When the bar is calculated, the description is formed automatically.

   The XFACTOR parameter indicates the factor against whose levels the means are plotted. With a two-way table, a separate line will be plotted for every level of a second factor. If the table is being obtained automatically, this second factor can be specified explicitly using the GROUPS parameter. If neither XFACTOR nor GROUPS are specified with a two-way table, AGRAPH will select the XFACTOR according to the following criteria (in decreasing order of importance): that the factor has no labels, that it has levels that are not the default integers 1 upwards, or that it has more levels than the other factor. Two-way tables can be obtained from ANOVA and plotted, even if the analysis contained only the main effects of the two factors; however, the lines will then all be parallel. 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 option XFREPRESENTATION=levels.

   The TITLE, YTITLE and XTITLE parameters allow you to supply titles for the graph, the y-axis and the x-axis respectively.

 

Options: GRAPHICS, METHOD, XFREPRESENTATION, PSE, LSDLEVEL, SAVE.

Parameters: XFACTOR, GROUPS, MEANS, BAR, NEWXLEVELS, TITLE, YTITLE, XTITLE, BARDESCRIPTION.


Method

To set the various defaults (if necessary) AGRAPH uses the GET directive to obtain the ANOVA save structure, AKEEP to obtain the TREATMENT formula, FCLASSIFICATION to obtain the first two factors and GETATTRIBUTE to discover which have labels and so on. If a regression save structure is supplied, the information is saved using the AUKEEP procedure.