Forms tables of means classified by `ANOVA`

treatment factors (R.W. Payne).

### Options

`PRINT` = string tokens |
What to print (`means` , `sed` , `sedsummary` , `ese` , `lsd` , `lsdsummary` ); default `mean` , `sed` |
---|---|

`MEANS` = table |
Saves means; default `*` |

`SED` = symmetric matrix |
Saves matrices of standard errors of differences between means; default `*` |

`ESE` = table |
Saves effective standard errors; default `*` |

`LSD` = symmetric matrix |
Saves least significant differences between means; default `*` |

`LSDLEVEL` = scalar |
Significance level (%) for least significant differences; default 5 |

`DFMEANS` = symmetric matrices |
Saves degrees of freedom for comparisons between every pair of entries in the table of means |

`EQFACTORS` = factors |
Factors whose levels are to be assumed to be equal within the comparisons between means, when calculating effective standard errors |

`SAVE` = `ANOVA` save structure |
Save structure to provide the table of means; default uses the save structure from the most recent `ANOVA` |

### Parameter

`CLASSIFY` = vectors |
Factors to classify table of means (from those in the `TREATMENTSTRUCTURE` in the `ANOVA` analysis) |
---|

### Description

`AFMEANS`

calculates and prints tables of predicted means classified by treatment factors from an `ANOVA`

analysis. It uses the same method as `ANOVA`

itself, but with the extension that the term defined by the full list of factors need not have been included in the analysis. So, for example, you can obtain an `A`

× `B`

table of means, even if the model contained only the `A`

and `B`

main effects. Alternatively, in a more realistic scenario, you may have significant `A.B`

and `B.C`

interactions, but no `A.B.C`

interaction. You might then still want to present an `A`

× `B`

× `C`

table means, even though you might not want to include an `A.B.C`

interaction.

The factors classifying the table of means are specified by the `CLASSIFY`

parameter. By default the means are formed for the most recent `ANOVA`

, but you can use the `SAVE`

option to supply the save structure from an earlier analysis.

Printed output is controlled by settings of the `PRINT`

option:

`means` |
means, |
---|---|

`ese` |
effective standard errors of the means, |

`sed` |
standard errors for differences between the means, |

`sedsummary` |
summary of the standard errors for differences between the means, |

`dfmeans` |
degrees of freedom for the standard errors of differences between means, |

`lsd` |
least significant differences between the means, and |

`lsdsummary` |
summary of the least significant differences between the means. |

The default is to print means and a summary of the standard errors of differences. Note: if all the differences between means have the same standard error of difference, a summary is printed for the settings `sed`

and `lsd`

, instead of the full symmetric matrix of values. The `LSDLEVEL`

option specifies the significance level (%) to use in the calculation of least significant differences (default 5%). The `EQFACTORS`

option allows you to specify factors within the tables of means whose levels are assumed to be equal for the two means, when calculating effective standard errors.

The `MEANS`

, `SED`

, `ESE`

, `LSD`

and `DFMEANS`

options allow the results to be saved in appropriate Genstat data structures.

Options: `PRINT`

, `MEANS`

, `SED`

, `ESE`

, `LSD`

, `LSDLEVEL`

, `DFMEANS`

, `EQFACTORS`

, `SAVE`

.

Parameter: `CLASSIFY`

.

### See also

Directive: `ANOVA`

.

Procedure: `AUPREDICT`

.

Commands for: Analysis of variance.

### Example

CAPTION 'AFMEANS example',!t('Split plot design, see the',\ 'Guide to Genstat, Part 2, Section 4.2.1.'); STYLE=meta,plain SPLOAD [PRINT=*] '%GENDIR%/Data/Oats.gsh' " Convert yields to cwt per acre." CALCULATE yield=(yield*80)/(112*4) " Subplots nested within whole-plots nested within blocks." BLOCK blocks/wplots/subplots " Define the treatment model with only main effects of variety & nitrogen." TREATMENTS variety+nitrogen ANOVA [PRINT=aov,means; PSE=means,differences] yield " Calculate variety-by-nitrogen predicted means." AFMEANS [PRINT=means,sed,ese,dfmeans; SED=sed; DFMEANS=dfm]\ variety,nitrogen