RTCOMPARISONS procedure
Calculates comparison contrasts within a multi-way table of means (R.W. Payne).
Options
Parameters
Description
RTCOMPARISONS makes comparisons within multi-way tables of predicted means from a linear or generalized linear regression or an analysis of variance. The model should previously have been fitted by the FIT or ANOVA directives in the usual way. The SAVE option can be used to specify the save structure from the analysis for which the comparisons are to be calculated (see the SAVE option of the MODEL or ANOVA directives). If SAVE is not specified, the comparisons are calculated from the most recent regression analysis.
Each comparison is specified in a table supplied by the CONTRAST parameter. For a regression analysis, RTCOMPARISONS calculates the means using the PREDICT directive. The first step (A) of the calculation forms the full table of predictions, classified by every factor in the model. The second step (B) averages the full table over the factors that do not occur in the table of means. The COMBINATIONS option specifies which cells of the full table are to be formed in Step A. The default setting, estimable, fills in all the cells other than those that involve parameters that cannot be estimated, for example because of aliasing. Alternatively, setting COMBINATIONS=present excludes the cells for factor combinations that do not occur in the data, or COMBINATIONS=full uses all the cells. The ADJUSTMENT option then defines how the averaging is done in Step B. The default setting, marginal, forms a table of marginal weights for each factor, containing the proportion of observations with each of its levels; the full table of weights is then formed from the product of the marginal tables. The setting equal weights all the combinations equally. Finally, the setting observed uses the WEIGHTS option of PREDICT to weight each factor combination according to its own individual replication in the data. The COMBINATIONS and ADJUSTMENT options are irrelevant if a SAVE structure is from an ANOVA analysis - the means are then obtained using AKEEP (and correspond to those that would be printed by ANOVA).
The PRINT option controls printed output, with setting:
The ESTIMATE parameter allows you to save the estimated contrast, and the SE parameter can save its standard errors.
Options: PRINT, COMBINATIONS, ADJUSTMENT, SAVE.
Parameters: CONTRAST, ESTIMATE, SE.
Method
The predicted means and their variances and covariances are obtained using the PREDICT directive for a regression analysis, or using AKEEP for an analysis of variance. The comparisons and their standard errors are then calculated using GenStat's table and matrix calculation facilities.