Checks assumptions for an `ANOVA`

analysis (R.W. Payne).

### Options

`PRINT` = string tokens |
Controls printed output (`tests` , `confirmation` ); default `conf` |
---|---|

`ASSUMPTION` = string tokens |
Which assumptions to test (`homogeneity` , `normality` , `stability` ); default `homo` , `norm` , `stab` |

`PROBABILITY` = scalar |
Critical value for the test probabilities to decide whether to generate warning messages; default 0.025 |

`SAVE` =
save structure |
Specifies the analysis to be checked; by default this will be the most recent `ANOVA` |

### No parameters

### Description

Procedure `ACHECK`

checks some of the assumptions for an analysis of variance that has been performed by the `ANOVA`

directive. By default, the most recent `ANOVA`

analysis is checked. However, you can check an earlier analysis, by using the `SAVE`

option of `ACHECK`

to specify its save structure (saved using the `SAVE`

parameter of the earlier `ANOVA`

command).

The assumptions to check are controlled by the `ASSUMPTIONS`

option, with the following settings.

`homogeneity` |
performs Levene tests to check whether the residual variance seems to be affected by any of the terms in the analysis. With stratified designs it will make similar checks for the residual variation in the higher strata (e.g. for the whole-plot variation in a split-plot design). |
---|---|

`normality` |
performs a Shapiro-Wilk test to check for evidence that the residuals do not come from a Normal distribution. |

`stability` |
performs two Levene tests to check whether the residual variance differs according to the size of the response. The data are divided into three groups (small, intermediate and large) according to the sizes of their fitted values. The tests compare the variance of the residuals in the first (small) group with those in the third (large) group, and the variance of the second (intermediate) group with the variance of other two groups combined. |

By default, they are all tested.

`ACHECK`

produces warning messages if any of the tests generates a test probability less than or equal to the value specified by the `PROBABILITY`

option. The default value is 0.025 (i.e. 2.5%), which is the same as the value used for the similar messages that may occur with the summary of analysis in regression. It is important to realise that the estimated residuals (from either regression or analysis of variance) will be correlated. The Levene and Shapiro-Wilk tests assume that the residuals are independent Normally-distributed observations. Their test probabilities may therefore be too low – and generate too many significant results. So the use of a smaller critical probability value provides some protection against spurious messages.

Other output is controlled by the `PRINT`

option, with settings:

`tests` |
prints the detailed test results, and |
---|---|

`confirmation` |
prints a confirmatory message if there are no problems. |

By default `PRINT=confirmation`

.

Options: `PRINT`

, `ASSUMPTIONS`

, `PROBABILITY`

, `SAVE`

.

Parameters: none.

### Method

Details about Levene tests can be found in Snedecor & Cochran (1989); also see O’Neill & Mathews (2002) for further information about the issues that arise in their use in balanced analysis of variance.

The Shapiro-Wilk test is performed by the `WSTATISTIC`

procedure, which uses the methods of Royston (1993, 1995).

### Action with `RESTRICT`

If the y-variate in the `ANOVA`

was restricted, only the units not excluded by the restriction will be included in the checks.

### References

O’Neill, M.E. & Mathews, K.L. (2002) Levene tests of homogeneity of variance for general block and treatment designs. *Biometrics*, 58, 216-224.

Royston, P. (1993). A toolkit for testing for non-normality in complete and censored samples. *The Statistician*, 42, 37-43.

Royston, P. (1995). A remark on Algorithm AS 181: the W-test for Normality. *Applied Statistics*, 44, 547-551.

Snedecor, G.W. & Cochran, W.G. (1989). *Statistical Methods (eighth edition)*. Iowa State University Press, Ames.

### See also

Directive: `ANOVA`

.

Procedures: `APLOT`

, `VCHECK`

, `WSTATISTIC`

.

Commands for: Analysis of variance.

### Example

CAPTION 'ACHECK example',!t('Plankton example from Snedecor & Cochran',\ '(1967, Statistical Methods, 6th Edition, p. 329);',\ 'also see Section 4.5 of the Analysis of Variance Guide.');\ STYLE=meta,plain SPLOAD '%gendir%/data/Plankton.gsh' BLOCKSTRUCTURE Haul TREATMENTSTRUCTURE Type ANOVA Number ACHECK [PRINT=tests; PROBABILITY=0.05]