1. Home
  2. AONEWAY procedure

AONEWAY procedure

Performs one-way analysis of variance (R.W. Payne).

Options

PRINT = string tokens Controls printed output from the analysis of variance (aovtable, information, covariates, effects, residuals, contrasts, means, cbeffects, cbmeans, stratumvariances, %cv, missingvalues, homogeneity, permutationtest); default aovt, mean, miss
GROUPS = factor Defines the treatments for the analysis
COVARIATES = variates Covariates (if any) for analysis of covariance
PLOT = string tokens Which residual plots to provide (fittedvalues, normal, halfnormal, histogram, absresidual); default fitt, norm, half, hist
GRAPHICS = string token Type of graphs (lineprinter, highresolution); default high
FPROBABILITY = string token Probabilities for variance ratio (yes, no); default no
PSE = string tokens Types of standard errors to be printed with the means (differences, lsd, means); default diff
LSDLEVEL = scalar Significance level (%) for least significant differences; default 5
NTIMES = scalar Number of random allocations to make when PRINT=perm; default 999
SEED = scalar 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

Parameters

Y = variates Each of these contains the data values for an analysis
RESIDUALS = variates Saves the residuals from each analysis
FITTEDVALUES = variates Saves the fitted values from each analysis

Description

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.

The 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 POL, REG or 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 PRINT option. The most relevant settings are:

    aovtable to print the analysis-of-variance table;
    means to print the table of means;
    effects to print the effects (means minus grand mean);
    %cv to print the coefficient of variation;
    missingvalues to print estimates for missing values (if any);
    homogeneity to print tests for the homogeneity of the variances within the groups; and
    permutationtest analysis-of-variance table with the probabilities calculated by a random permutation test.

However, for compatibility, all the settings of the PRINT option of ANOVA are included. By default, when PRINT=perm, 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.

The 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 LSDLEVEL option.

The PLOT option allows up to four of the following residual plots to be requested:

    fittedvalues for a plot of residuals against fitted values;
    normal for a Normal plot;
    halfnormal for a half-Normal plot;
    histogram for a histogram of residuals; and
    absresidual 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 lineprinter.

Variates of residuals and fitted values can be saved using the RESIDUALS and 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).

Options: PRINT, GROUPS, COVARIATES, PLOT, GRAPHICS, FPROBABILITY, PSE, LSDLEVEL.

Parameters: Y, RESIDUALS, FITTEDVALUES .

Method

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 VHOMOGENEITY.

Action with RESTRICT

If the Y variate is restricted, only the units not excluded by the restriction will be analysed.

See also

Directive: ANOVA.

Procedure: A2WAY.

Commands for: Analysis of variance.

Example

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
Updated on June 20, 2019

Was this article helpful?