Die nachfolgenden Inhalte sind englischsprachig.

## Overview

- A CRAN Task view shows R's abilities in Design of Experiments (DoE).
- I maintain a suite of four R packages with focus on industrial experimentation:
**DoE.base**for orthogonal arrays, factorial designs and infrastructure (on CRAN, downloads last month^{*}),**FrF2**for 2-level fractional factorial designs (on CRAN, downloads last month^{*}),**DoE.wrapper**for integrating design functionality from further packages (on CRAN, downloads last month^{*}), and**RcmdrPlugin.DoE**as a graphical user interface for those who do not want to do command line programming: (on CRAN, downloads last month^{*}). These packages are described in more detail below. Please feel free to contact me with thoughts and suggestions. - Two further supplemental R packages are provided: package
**DoE.MIParray**(on CRAN) creates orthogonal (or also supersaturated) arrays for smallish situations, for which neither package**DoE.base**nor the web have the suitable array on offer. Package**FrF2.catlg128**(on CRAN) enhances package**FrF2**with large catalogues of regular fractional factorial 2-level designs in 128 runs.

*: number of downloads from R-Studio servers last month, as obtained from package cranlogs

## Four R packages

R-Package DoE.base (on CRAN, no. of downloads from R-Studio servers last month)

- holds parent and child orthogonal arrays with up to 144 runs listed by Warren Kuhfeld
- provides functions
for full factorial designs - including blocked ones - and`fac.design`

for designs based on orthogonal arrays**oa.design** - provides functionality for selecting an appropriate orthogonal array: function

and functions for checking and optimizing quality criteria of experimental designs obtained by using only some of the columns of an orthogonal array (**show.oas**,`lengths`

,`P2.2`

,`P3.3`

,**P4.4**

,**SCFTs**

,**oa.min3**,`oa.min34`

,`oa.maxGR`

)**oa.maxGR.min34** - provides the class

that is used by all my DoE packages to store and access information on experimental designs**design** - provides further utility functions for my other DoE packages: printing, plotting and summary, exporting and reintegrating responses typed in outside of R, combining designs e.g. for Taguchi inner/outer arrays (function
), editing data (although it is not recommended to do that in R).`param.design`

- provides default linear model analyses for experimental designs of class design (not meant to be an expert system, statistical expertise is
**not**replaced); for this purpose, the functions

and**lm**

from package**aov****stats**are replaced with generics, whose default methods are the original functions; while this is harmless, it causes masking messages when loading the package. - while most features have been extensively tested, there are presumably still some gaps in the testing regarding combination functions - bug reports invited!

Masking of existing functions and importing package **DoE.base**:

- Function

from package**plot.design****graphics**is masked, but invokes the original function for class design objects not created by my DoE packages. - Functions

and**lm**

from package**aov****stats**are replaced with generics, whose default methods are the original functions from package**stats**. - Function

from package**lengths****base**is masked with a generic, whose default method is the original function from package**base**. - If a package author wants to incorporate functionality from package
**DoE.base**into her/his package without depending on**DoE.base**, it is not recommended to use

, because the most important function**importFrom**

relies on the presence of many objects from the**oa.design****DoE.base**namespace. Either simply import the entire package, or exclude some functions that you do not want to have, e.g. with a command like '

' in the NAMESPACE file.**import(DoE.base, except=c("lm", "aov", "lm.design", "aov.design", "lm.formula", "aov.formula"))**

For using the function

, it is also necessary to**oa.design**

the orthogonal arrays (objects whose name start with**export**

) and the function**L**. If you want to use optimization functionality within function`contr.XuWu`

, you will also need to export the optimization functions**oa.design**

,**oa.min3**

, and so forth. There may be further functions or other objects that need to be exported, e.g. the catalogues**oa.min34**

and**oacat**

. It may be simplest to copy/paste the export command from the**oacat3****DoE.base**NAMESPACE file and remove the objects that you do not want to export.

Highest priority developments:

- improve applicability of optimization functions for orthogonal arrays (computational efficiency)
- extended testing of combination functions / change conceptualisation of their design.info attributes ?
- provide an example-based manual

## Orthogonal arrays (OAs) on the web

**NEW: **Where neither package **DoE.base** nor the web offers a suitable array, R package **DoE.MIParray** (on CRAN) can create orthogonal arrays (especially useful for relatively small mixed level applications). Grain of salt: the package requires installation of at least one of the commercial optimizing softwares Gurobi or Mosek.

Several authors provide extensive collections of orthogonal arrays on the web. The R package **DoE.base** contains the entire collection by Kuhfeld, and additionally contains some interesting strength 3 (=resolution IV) arrays from other sources, among them the web sources listed below:

- Andries Brouwer: Small mixed fractional factorial designs of strength 3 (link); many OAs explicitly listed
- Pieter Eendebak and Eric Schoen: various GMA OAs explicitly listed, for many larger series only the number of existing arrays given (link)
- Warren Kuhfeld: many OAs (strength 2 only), as used in his SAS utilities (link)
- Neil Sloane: many OAs explicitly listed, accompanies and supplements the seminal book by Hedayat, Sloane and Stufken (1999) (link)
- Design resources server: some parts appear a bit outdated, but there is also a lot of useful information there (link). For OAs (strength 2 listed only), the other listings are likely more useful.

**Note**: Every user can add arrays for use with function oa.design of the package; these have to be matrices with integer levels coded starting with 1, and with class vector c("oa", "matrix"). If you find an interesting array that is missing from the package, please let me know so that others can also benefit from its availability. Also, please call my attention to further relevant OA sources on the web.

R-Package **FrF2** (on CRAN, no. of downloads from R-Studio servers last month)

- holds a large catalogue of regular 2-level fractional factorial designs
- further catalogue (complete catalogue of
*those*resolution IV plans with up to 24 factors in 128 runs*that are necessary for finding MA clear designs*) in package**FrF2.catlg128**on CRAN

The previously packaged complete catalogues including those not needed for finding MA clear designs are available for download here (about 6MB).

- further catalogue (complete catalogue of
- provides functions
for design of regular and`FrF2`

for design of non-regular Fractional Factorial 2-level designs - center points are possible for designs with quantitative factors only`pb`

- function
has many options for creating tailored experiments (request certain 2-factor interactions to be estimable, create blocked or split-plot designs or designs for some hard-to-change-factors)`FrF2`

- provides functions for simple graphical analyses of 2-level Fractional Factorials

R-Package **DoE.wrapper** (on CRAN, no. of downloads from R-Studio servers last month)

- creates access to DoE functionality from other packages
- has a syntax that is close to the conventions used in the other packages of the project
- makes use of class design as provided in
**DoE.base** - creates response surface designs (based on package
**rsm**) and offers support for creating rsm models:- Box-Behnken designs can be generated with function
`bbd.design`

- central composite designs can be generated with functions
`ccd.design`

or`ccd.augment`

, using package**FrF2**for creating the cube portion of the design - the cube portion for central composite designs is automatically determined to be the smallest possible resolution V design, if nothing else is requested by the user (make sure to use recent version of package
**FrF2**) - function
`rsmformula`

together with function`code.design`

create everything necessary for creating an rsm model (for people who do not want to deal with the somewhat special syntax of function`rsm`

)

- Box-Behnken designs can be generated with function
- creates and augments D-optimal designs based on package
**AlgDesign** - creates and augments latin hypercube samples based on packages
**lhs**and**DiceDesign**

The R-Commander plugin **RcmdrPlugin.DoE** is on CRAN (no. of downloads from R-Studio servers last month). *It is recommended to use the latest version together with the latest versions of all other packages (installation order: ***DoE.base, FrF2, DoE.wrapper, RcmdrPlugin.DoE***).*

A tutorial for **RcmdrPlugin.DoE** can be found here; example data for working through this tutorial can be downloaded.

The R-Commander plugin **RcmdrPlugin.DoE**

- provides a graphical user interface (GUI) for much of the packages' functionality, so that the methodology becomes usable for people who are not willing to learn how to program R code;

look here for instructions on how to get going if you are not familiar with R.*(I have checked these instructions for Windows and MaxOS X (Snow Leopard). If you are on Linux, you are partly on your own, since I have no experience with installation of R-packages for Linux systems; there may be extra steps involved.)* - is based on the R-commander
- is still in
**beta**shape. While the package has undergone some testing by myself and a few other users, it is very likely that it does still have some bugs that are only found when using certain menus in an as yet untested order or under other circumstances that I failed to consider. Testing a GUI is particularly cumbersome, therefore I want to strongly encourage those who undertake it to work with this beta version to report anything that appears to be a bug or unexpected behavior.

Wishes are of course also very welcome (but not too likely to be fulfilled ...). - As with all R packages licensed under GPL 2, it is of course also true here and is emphasized in order to make it very clear that you need to be particularly cautious in applying the current beta version of the software: BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

The most important future developments:

- incorporate feedback from beta testers
- incorporation further possibilities for D-optimal designs (augmentation, blocking)
- incorporation of further designs for computer experiments
- more flexibility for blocked designs (regular 2-level fractional factorial and full factorial designs)
- implementation of split-plot designs
- polish the GUI w.r.t. to consistency, until internationalization makes sense