AGRAPH procedure
Plots one- or two-way tables of means from ANOVA (R.W. Payne).
Options
Parameters
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:
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.