DAPLOT procedure
Plots residuals from ANOVA with interactive identification of outliers (R.J. Reader).
Options
Parameter
Description
DAPLOT provides five types of high-resolution plot for residuals from an ANOVA. These are selected using the METHOD parameter with settings: histogram for a histogram of residuals, fittedvalues for residuals versus fitted values, normal for a Normal plot,
halfnormal for a half-Normal plot, and added for an added variable plot (Cook & Weisberg, 1982). Up to four can be examined in any call of the procedure.
If METHOD is set to added, the ADDED option must be set to the variate or factor that is to provide the x-values for the plot. These could, for example, be residuals from an analysis of variance of a possible covariate.
The PEN option controls the pen or pens used for the plotting. Other aspects of the graphics environment, such as windows, are set automatically, and restored at the end of the procedure.
If the graphs are plotted interactively, the SELECTED option allows points to be selected from any graph except a histogram. The graphs are then replotted highlighting the selected points, and the unit numbers of the corresponding elements of the original ANOVA y-variate are saved in the variate specified by SELECTED.
The residuals and fitted values are accessed automatically from the structure specified by the SAVE option which, by default, will be that for the last y-variate analysed by ANOVA. Missing values are inserted in the fitted values and residuals in any units that were missing in the original y-variate.
Options: PEN, SELECTED, ADDED, SAVE. Parameter: METHOD.
Method
Residuals and fitted values are accessed, using AKEEP, from the latest ANOVA, or from that specified by the SAVE option.
For a Normal plot, the Normal quantiles are calculated as follows:
qi = NED( (i-0.375) / (n+0.25) )
while for a half-Normal plot they are given by
qi = NED( 0.5 + 0.5 × (i-0.375) / (n+0.25) ).
The graphs are plotted initially using the pen(s) specified by the PEN option. The characteristics of the pen(s) can be altered using the PEN directive for example to enable different levels of a factor to be plotted with different symbols.
The QUESTION directive is used to determine the graph from which points are to be selected. The DREAD directive is then used to identify the points with the cursor, in the usual way. If any points have been selected, all the graphs are redrawn with the attributes of default pen 2 for the selected points and those of default pen 1 for the others.
Action with
RESTRICT
If the y-variate in the ANOVA is restricted, only the units not excluded by the restriction are included in the graphs.
Reference
Cooke R.D, & Weisberg S. (1982). Residuals and Influence in Regression. London: Chapman & Hall.