| Maintainer: | Ulrike Groemping |
| Contact: | groemping at bht-berlin.de |
| Version: | 2010-09-06 |
This task view collects information on R packages for experimental design and analysis of data from experiments. Please feel free to suggest enhancements, and please send information on new packages or major package updates if you think they belong here. Contact details are given on my Web page .
Experimental design is applied in many areas, and methods have been tailored to the needs of various fields. This task view starts out with a section on the most general packages, continues with specific sections on agricultural and industrial experimentation and closes with a section on the various special experimental design packages that have been developed for specific purposes. Of course, the division into fields is not always clear-cut, and some packages from the more specialized sections can also be applied in general contexts.
There are a few packages for creating and analyzing experimental designs for general purposes: First of all, the standard (generalized) linear model functions in the base package stats are of course very important for analyzing data from designed experiments (especially functions lm(), aov() and the methods and functions for the resulting linear model objects). These are concisely explained in Kuhnert and Venables (2005, p. 109 ff.); Vikneswaran (2005) points out specific usages for experimental design (using function contrasts(), multiple comparison functions and some convenience functions like model.tables(), replications() and plot.design()). granova offers some interesting non-standard graphical representations for results of simply-structured experiments (one-way and two-way layouts, paired data). AlgDesign creates full factorial designs with or without additional quantitative variables, creates mixture designs (i.e., designs where the levels of factors sum to 1=100%) and creates D-, A-, or I-optimal designs exactly or approximately. NOTE: Bob Wheeler, the author and maintainer of AlgDesign, would like to retire from this job and is looking for an "heir" whom he can entrust with continuing the package. Please contact Bob, if you are interested. Package conf.design allows to create a design with certain interaction effects confounded with blocks (function conf.design()) and allows to combine existing designs in several ways (e.g., useful for Taguchi's inner and outer array designs in industrial experimentation). Package dae provides various utility functions around experimental design and R factors, e.g. a randomization routine that can handle various nested structures (according to Bailey 1981) and functions for combining several factors into one or dividing one factor into several factors. Furthermore, the package provides features for post-processing objects returned by the aov() function, e.g. extraction of Yates effects for 2-level experiments. blockTools assigns units to blocks in order to end up with homogeneous sets of blocks in case of too small block sizes.
agricolae offers extensive functionality on experimental design especially for agricultural and plant breeding experiments, which can also be useful for other purposes. It supports planning of lattice designs, factorial designs, randomized complete block designs, completely randomized designs, (Graeco-)Latin square designs, balanced incomplete block designs and alpha designs. There are also various analysis facilities for experimental data, e.g. treatment comparison procedures and several non-parametric tests, but also some quite specialized possibilities for specific types of experiments.
Some further packages especially handle designs for industrial experiments that are often highly fractionated, intentionally confounded and have few extra degrees of freedom for error.
A suite of related packages (cf. Groemping 2009),
DoE.base,
FrF2
and
DoE.wrapper,
works with the same principal syntax and output structure, for which a central feature
is the class
design
for experimental design objects. A fourth package,
RcmdrPlugin.DoE
(beta version!), integrates the functionality from these three packages
into the R-Commander (package
Rcmdr, Fox 2005) for the benefit of those
R users who cannot or do not want to do command line programming.
DoE.base
provides full factorial designs and orthogonal
arrays for main effects experiments (those listed by Kuhfeld 2009 up to 144 runs, plus a few additional ones)
The package also provides the infrastructure for the other two packages of the suite,
including the class
design
for experimental design data frames,
and various methods for this class. There is also some experimental functionality
for assessing the quality of orthogonal arrays.
FrF2
generates regular Fractional Factorial
designs for factors with 2 levels as well as Plackett-Burman type screening designs.
Regular fractional factorials default to maximum resolution minimum aberration designs
and can be customized in various ways, supported by an
incorporated catalogue of designs (including the designs catalogued by Chen, Sun and Wu 1993,
and further larger designs catalogued in Block and Mee 2005 and Xu 2009;
the additional package
FrF2.catlg128
provides a very large complete catalogue
for resolution IV 128 run designs with up to 23 factors for special purposes).
Analysis-wise,
FrF2
provides simple graphical analysis tools (normal and half-normal effects plots
(modified from
BsMD, cf. below), main effects
plots and interaction plot matrices similar to those in Minitab software, and a cube
plot for the combinations of three factors). It can also show the alias structure
for regular fractional factorials of 2-level factors.
DoE.wrapper
brings some functionality from packages
rsm,
lhs,
DiceDesign
(cf. also below) and
AlgDesign
into the context of the other two packages and adds convenience features and
other possibilities. In particular, the package allows to automatically choose the
cube portion of central composite designs (CCDs) or to augment an existing cube into a CCD.
BHH2 accompanies the 2nd edition of the book by Box, Hunter and Hunter and provides various of its data sets. It can generate full and fractional factorial two-level-designs from a number of factors and a list of defining relations (function ffDesMatrix(), less comfortable than package FrF2). It also provides several functions for analyzing data from 2-level factorial experiments: The function anovaPlot assesses effect sizes relative to residuals, and the function lambdaPlot() assesses the effect of Box-Cox transformations on statistical significance of effects. BsMD provides Bayesian charts as proposed by Box and Meyer (1986) as well as effects plots (normal, half-normal and Lenth) for assessing which effects are active in a fractional factorial experiment with 2-level factors. Apart from tools for planning and analysing factorial designs, R also offers support for response surface optimization via package rsm. This package supports sequential optimization with first order and second order response surface models, offering optimization approaches like steepest ascent and visualization of the response function for linear model objects. Also, coding for response surface investigations is facilitated.
Computer experiments with quantitative factors require special types of experimental designs: it is often possible to include many different levels of the factors, and replication will usually not be beneficial. Also, the experimental region is often too large to assume that a linear or quadratic model adequately represents the phenomenon under investigation. Consequently, it is desirable to fill the experimental space with points as well as possible (space-filling designs) in such a way that each run provides additional information even if some factors turn out to be irrelevant. The lhs package provides latin hypercube designs for this purpose. Furthermore, the package provides ways to analyse such computer experiments with emphasis on what follow-up experiments to conduct. Another package with similar orientation is the DiceDesign package, which adds further ways to construct space-filling designs and some measures to assess the quality of designs for computer experiments. The package DiceKriging provides the kriging methodology which is often used for creating meta models from computer experiments.
Various further packages handle special situations in experimental design: desirability provides ways to combine several target criteria into a desirability function in order to simplify multi-criteria analysis. experiment contains tools for clinical experiments, e.g., a randomization tool, and it provides a few special analysis options for clinical trials. The DoseFinding package provides functions for the design and analysis of dose-finding experiments (for example pharmaceutical Phase II clinical trials); it combines the facilities of the MCPMod package (maintenance discontinued; described in Bornkamp, Pinheiro and Bretz 2009) with a special type of optimal designs for dose finding situations (MED-optimal designs, or D-optimal designs, or a mixture of both; cf., Dette et al. 2008). ldDesign suggests appropriate designs for linkage equilibrium studies, crossdes creates and analyses cross-over designs of various types (including latin squares, mutually orthogonal latin squares and Youden squares) that can for example be used in sensometrics. Package SensoMineR contains special designs for sensometric studies, e.g., for the triangle test.