Design and analysis of experiments


GenStat has a very general algorithm for analysis of variance of balanced experiments. There are several directives to define the various aspects of model to be fitted:


BLOCKSTRUCTURE
defines the blocking structure of the design, and hence the strata and error terms

COVARIATE
specifies covariates for analysis of covariance

TREATMENTSTRUCTURE
defines the treatment (or systematic) terms


For unstructured designs with a single error term, BLOCKSTRUCTURE need not be specified, and COVARIATE is needed only for analysis of covariance. Once the model has been defined, the y-variates can be analysed using the ANOVA directive:


ANOVA
performs analysis of variance


Directives are available to save information in GenStat data structures, or to produce further output:


ADISPLAY
displays further output from analyses produced by ANOVA

AKEEP
copies information from an ANOVA analysis into GenStat data structures


Procedure relevant to analysis of variance, in the aov module of the Library, include:


AGRAPH
plots one- or two-way tables of means from ANOVA

APLOT
plots residuals from an ANOVA analysis

AFIELDRESIDUALS
display residuals in field layout

ASTATUS
provides information about the settings of ANOVA models and variates

APERMTEST
does random permutation tests for analysis-of-variance tables

A2WAY
performs analysis of variance of a balanced or unbalanced design with up to two treatment factors

A2DISPLAY
provides further output following an analysis of variance by A2WAY

A2KEEP
copies information from an A2WAY analysis into GenStat data structures

ABIVARIATE
produces graphs and statistics for bivariate analysis of variance

ALIAS
finds out information about aliased model terms in analysis of variance

AMTIER
analyses a multitiered design by analysis of variance specified by up to 3 model formulae

AMTDISPLAY
displays further output for multitiered designs analysed by AMTIER

APOLYNOMIAL
forms the equation for a polynomial contrast fitted by ANOVA

AREPMEASURES
produces an analysis of variance for repeated measurements

ASCREEN
performs screening tests for designs with orthogonal block structure

AUNBALANCED
performs analysis of variance for unbalanced designs

AUDISPLAY
produces further output for an unbalanced design (after AUNBALANCED)

AUKEEP
saves output from analysis of an unbalanced design (by AUNBALANCED)

MAANOVA
does analysis of variance for a single-channel microarray design (parallel anova)

CONFIDENCE
calculates simultaneous confidence intervals

ALLPAIRWISE
performs a range of all pairwise multiple comparison tests

SED2ESE
calculates effective standard errors that give good approximate standard errors of differences

A2PLOT
plots effects and robust s.e. estimates from designs with two-level factors

CENSOR
pre-processes censored data before analysis by ANOVA

CINTERACTION
clusters rows and columns of a two-way interaction table

DIALLEL
analyses full and half diallel tables with parents

AMMI
allows exploratory analysis of genotype × environment interactions

FRIEDMAN
performs Friedman's nonparametric analysis of variance

NLCONTRASTS
fits non-linear contrasts to quantitative factors in ANOVA

VHOMOGENEITY
tests homogeneity of variances


The REML algorithm is available for estimating variance components, fitting parameters of random correlation models and for analysing unbalanced designs.


REML
fits a variance-component model by residual (or restricted) maximum likelihood

VCOMPONENTS
defines the model for REML

VCYCLE
controls advanced aspects of the REML algorithm

VDISPLAY
displays further output from a REML analysis

VKEEP
copies information from a REML analysis into GenStat data structures

VSTRUCTURE
defines a variance structure for random effects in a REML model

VPEDIGREE
generates an inverse relationship matrix for use when fitting animal or plant breeding models by REML

VPREDICT
forms predictions from a REML model

VRESIDUAL
defines the residual term for a REML model

VSTATUS
prints the current model settings for REML


Procedures relevant to REML include:


VFUNCTION
calculates functions of variance components from a REML analysis

VPLOT
plots residuals from a REML analysis


Directives are available for generating the values of factors for experimental designs, for finding good multi-stratum and response-surface designs, for randomization and for constructing model formulae.


AFRESPONSESURFACE
uses the BLKL algorithm to construct response-surface designs

FKEY
forms design keys for multi-stratum experimental designs, allowing for confounding and aliasing of treatments

FPSEUDOFACTORS
determines patterns of confounding and aliasing from design keys, calculates resolution numbers, and extends the treatment formula to incorporate the necessary pseudo-factors

GENERATE
generates values of factors in systematic order or as defined by a design key, or forms values of pseudo-factors

RANDOMIZE
puts units of vectors into random order, or randomizes units of an experimental design

SET2FORMULA
forms a model formula using structures supplied in a pointer


Relevant procedures in the design module of the Library include:


DESIGN
acts as a menu-driven interface to the GenStat design system, providing a convenient way of selecting and generating various types of factorial design, also Latin squares, fractional factorial, lattice, alpha, balanced-incomplete-block, Box Behnken, central composite, cyclic, neighbour-balanced, Plackett Burman, loop and reference-level designs; if you prefer a command-based interface, the procedures that it uses (AGDESIGN, AKEY, AGHIERARCHICAL, AGFRACTION, AGLATIN, AGCROSSOVERLATIN, AGSEMILATIN, AGQLATIN, AGSQLATTICE, AGALPHA, AFALPHA, AGCYCLIC, AFCYCLIC, AGBIB, AGBOXBEHNKEN, AGCENTRALCOMPOSITE, AGMAINEFFECT, AGNEIGHBOUR, AGLOOP and AGREFERENCE) can also be called directly

AFLABELS
forms a variate of unit labels for a design

AFORMS
prints data forms for an experimental design

AFUNITS
forms a factor to index the units of the final stratum of a design

AMERGE
merges extra units into an experimental design

APOWER
calculates the power (probability of detection) for terms in an aov

APRODUCT
forms a new experimental design from the product of two designs

ARANDOMIZE
randomizes and prints an experimental design

ASAMPLESIZE
finds the replication to detect a treatment effect or contrast

DDESIGN
plots the plan of an experimental design

FACDIVIDE
represents a factor by factorial combinations of a set of factors

FACPRODUCT
forms a factor with a level for every combination of other factors

FBASICCONTRASTS
breaks a model term down into its basic contrasts

PDESIGN
prints or stores treatment combinations tabulated by the block factors

REPLICATION
calculates the replication necessary to detect a treatment effect

SBNTEST
calculates the sample size for binomial tests

SCORRELATION
calculates the sample size to detect specified correlations

SLCONCORDANCE
calculates the sample size for Lin's concordance coefficient

SMANNWHITNEY
calculates sample sizes for the Mann-Whitney test

SMCNEMAR
calculates sample sizes for McNemar's test

SPRECISION
calculates the sample size to obtain a specified precision

SSIGNTEST
calculates the sample size for a sign test

STTEST
calculates the sample size for t-tests (including equivalence tests)

AFCARRYOVER
forms factors to represent carry-over effects in cross-over trials

XOEFFICIENCY
calculates efficiency of estimating effects in cross-over designs

XOPOWER
estimates the power to estimate contrasts in cross-over designs