Performs one-way analysis of variance (R.W. Payne).
|Controls printed output from the analysis of variance (
||Defines the treatments for the analysis|
||Covariates (if any) for analysis of covariance|
||Which residual plots to provide (
||Type of graphs (
||Probabilities for variance ratio (
||Types of standard errors to be printed with the means (
||Significance level (%) for least significant differences; default 5|
||Number of random allocations to make when
||Seed for the random number generator used to make the allocations; default 0 continues from the previous generation or (if none) initializes the seed automatically|
||Each of these contains the data values for an analysis|
||Saves the residuals from each analysis|
||Saves the fitted values from each analysis|
AONEWAY provides customized facilities and output for one-way analysis of variance. For example, if the treatments have unequal replication, a standard error is printed for each mean, rather than the summary for comparisons of means with minimum and maximum replication as given by
ANOVA. Similarly, any missing values are excluded from the analysis by
AONEWAY. Conversely, in
ANOVA they need to be included, to ensure balance in the more general situations that it covers, and are estimated as part of the analysis. In addition,
AONEWAY provides residual plots directly, instead of requiring you to use procedure
APLOT after the analysis, and it can test the homogeneity of the variances within the groups.
Y parameter supplies a variate containing the data values to be analysed. The factor defining the groups to be compared is supplied by the
GROUPS option. You can either specify just the factor to produce a simple one-way anova, or you can put it within a
COMPARISON function to fit some contrasts at the same time. There is also a
COVARIATES option which can supply one or more variates to be used as covariates in an analysis of covariance.
Printed output is requested by listing the required components with the
||to print the analysis-of-variance table;|
||to print the table of means;|
||to print the effects (means minus grand mean);|
||to print the coefficient of variation;|
||to print estimates for missing values (if any);|
||to print tests for the homogeneity of the variances within the groups; and|
||analysis-of-variance table with the probabilities calculated by a random permutation test.|
However, for compatibility, all the settings of the
ANOVA are included. By default, when
AONEWAY makes 999 random allocations of the data to the two samples (using a default seed), and determines the probabilities of the variance ratios from their distribution over these randomly generated datasets. (It therefore makes no assumptions about the distribution of the data values.) The
NTIMES option allows you to request another number of allocations, and the
SEED option allows you to specify another seed.
AONEWAY checks whether
NTIMES is greater than the number of possible ways in which the data values can be allocated. If so, it does an exact test instead, which takes each possible allocation once.
FPROBABILITY option can be set to
yes to print of probabilities for variance ratios in the analysis-of-variance table. The
PSE option controls the standard errors printed with the tables of means. The default setting is
differences, which gives standard errors of differences of means. The setting
means produces standard errors of means,
LSD produces least significant differences, and by setting
PSE=* the standard errors can be suppressed altogether. The significance level to use in the calculation of the least significant differences can be changed from the default of 5% using the
PLOT option allows up to four of the following residual plots to be requested:
||for a plot of residuals against fitted values;|
||for a Normal plot;|
||for a half-Normal plot;|
||for a histogram of residuals; and|
||for a plot of the absolute values of the residuals against the fitted values.|
By default the first four are produced. The
GRAPHICS option determines the type of graphics that is used, with settings
highresolution (the default) and
Variates of residuals and fitted values can be saved using the
FITTEDVALUES parameters, respectively. Directive
AKEEP can be used to save other information from the analysis of the last data variate to be analysed by the procedure (see the Guide to the Genstat Command Language, Part 2, Section 4.6.1 for details).
AONEWAY uses the standard Genstat facilities for analysis of variance, except that the standard errors and lsd’s for the means are saved by
AKEEP and then printed, rather than being printed directly (as just a summary) by
ADISPLAY. Permutation tests are performed by
APERMTEST, residual plots are produced by
APLOT, and the homogeneity of variances is tested by
Y variate is restricted, only the units not excluded by the restriction will be analysed.
Commands for: Analysis of variance.
CAPTION 'AONEWAY example',\ !t('Data from Snedecor & Cochran (1980), Statistical Methods',\ '(7th edition), page 216 and also see page 252.');\ STYLE=meta,plain FACTOR [LEVELS=4; VALUES=(1...4)6] Fat VARIATE [VALUES=64,78,75,55, 72,91,93,66, 68,97,78,49,\ 77,82,71,64, 56,85,63,70, 95,77,76,68] Absorbed AONEWAY [PRINT=aov,means,homogeneity; GROUPS=Fat; FPROBABILITY=yes] Absorbed