ASWEEP procedure
Performs sweeps for model terms in an analysis of variance (R.W. Payne).
Options
Parameters
Description
The analysis-of-variance algorithm in the GenStat ANOVA directive involves a series of sweep operations performed on a working variate which initially contains the data values and finally contains the residuals. Sweeps may have two parts. The first involves the estimation of the effects of a particular term. For a term that is orthogonal to the terms that preceed it in the model, the effects are estimated simply by the tables of means for that term, calculated from the working variate; for non-orthogonal terms, the effects are the means divided by an efficiency factor. In the second part, the working variate is modified. Usually this involves subtracting the estimated effects. Alternatively there is a special sweep, known as a pivot, which is used to initiate the analysis within a stratum. In this, the value in each unit of the working variate is replaced by the corresponding effect of the term. Further details can be found in the Guide to GenStat, Part 2, Section 4.7.5, or in the paper by Payne & Wilkinson (1977). Procedure ASWEEP is provided as a research tool for studying the algorithm and its properties.
The values initially in the working variate are specified by the Y parameter. The procedure can sweep for a single term or, if several terms have the same efficiency factor, these can all be swept together. The TERM option specifies the term (or terms) and the efficiency factor is defined by the EFFICIENCY option. The EFFECTS parameter allows the estimated effects of the term(s) to be stored if option EMETHOD=calculated, or to be supplied if EMETHOD=given. The values in the working variate after the sweep can be saved using the RESIDUALS parameter, and the RMETHOD option indicates whether these are to be formed by an ordinary sweep (RMETHOD=subtract) or by a pivot (RMETHOD=replace). The SS parameter saves the sum of squares due to the term(s), and the RSS parameter saves the sum of squares of the working variate after the sweep.
Options: TERM, EFFICIENCY, EMETHOD, RMETHOD.
Parameters: Y, EFFECTS, RESIDUAL, SS, RSS.
Method
The procedure uses the standard GenStat directives for analysis of variance, calculations and manipulation.
Action with
RESTRICT
If the working variate (specified by the Y parameter) is restricted, the sweep will use only the units not excluded by the restriction.
Reference
Payne, R.W. & Wilkinson, G.N. (1977). A general algorithm for analysis of variance. Applied Statistics, 26, 251-260.