AFIELDRESIDUALS procedure

Display residuals in field layout (R.W. Payne & A.D.Todd).


Options

PRINT = strings
Controls output (contour, shade, table); default cont

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

METHOD = string
Type of residuals to take from the save structure when the RESIDUALS parameter is not specified (combined, finalstratum, standardizedfinal); default comb

MARGIN = string
Whether to include margins in printed tables (yes, no); default no


Parameters

Y = variates or factors
Specifies the y-coordinates of the plots

X = variates or factors
Specifies the x-coordinates of the plots

RESIDUALS = variates
Residuals to be plotted; default is to take the residuals from the save structure specified by the SAVE option, or from the most recent ANOVA if that is unspecified

SAVE = ANOVA save structures
Save structure of the ANOVA analysis from which to take the residuals if the RESIDUALS parameter is not specified; default is to take the most recent ANOVA analysis

FIELDWIDTH = scalars
Field width for printing the residuals; default 12

DECIMALS = scalars
Number of decimal places to use when printing the residuals


Description

In a field experiment it can be useful to study the spatial pattern of the residuals, for example to see if there are any systematic trends in fertility.

   The locations of the plots are defined by the Y and X parameters, specifying variates or factors containing their y- and x-coordinates respectively. By default the residuals are taken from the most recent ANOVA analysis. You can take the residuals from some other analysis, by specifying its save structure using the SAVE parameter. The METHOD option determines the type of residuals that are taken. The default setting combined gives residuals combining the residuals from all the strata (or error terms) in the analysis. (This corresponds to the CBRESIDUALS option of the AKEEP directive.) The other settings take the residuals only from the final stratum: finalstratum uses simple residuals and standardizedfinal uses standardized residuals. (These correspond to the RESIDUALS option of AKEEP, with the RMETHOD option set to either simple or standardized.) Alternatively, you can specify the residuals directly, in a variate, using the RESIDUALS parameter.

   Usually, the plots will all have different coordinates. However, if there are several plots with the same coordinates, mean residuals are calculated for each location. Thus for example, if you wanted only to look at the block and whole-plot residuals in a split-plot design, you could request combined residuals and then set identical coordinates for the (sub-) plots within each whole plot.

   AFIELDRESIDUALS provides three forms of representation, selected using the PRINT option as follows:

    table
prints the residuals in a table whose structure corresponds to the field layout,

    contour
generates a contour plot if the plots are on a regular grid or a line graph if they are arranged in a single line, and

    shade
can produce a shade plot for plots that are on a regular grid.

   The GRAPHICS option determines the type of graphics that is used, with settings highresolution (the default) and lineprinter. No graph can be produced if the plots are in an irregular 2-dimensional arrangement. High-resolution contour plots require more than 3 rows and columns, and line-printer contour plots require more than 4 rows and columns. The MARGIN option, with settings no (default) and yes, determines whether or not marginal summaries are included with the printed tables. The FIELDWIDTH and DECIMALS parameters can be used to specify the formats of the printed tables (as in the PRINT directive).

 

Options: PRINT, GRAPHICS, METHOD, MARGIN, SAVE.

Parameters: Y, X, RESIDUALS, FIELDWIDTH, RESIDUALS.


Method

AFIELDRESIDUALS obtains the residuals using the AKEEP directive, and then uses the standard GenStat facilities for manipulation and plotting.


Action with RESTRICT

If any of X, Y or RESIDUALS is restricted, only the unrestricted plots are displayed.