**Software for Exploratory Data Analysis and Statistical Modelling**, and kindly contributed to R-bloggers)

When considering using a full factorial experimental design there may be constraints on the number of experiments that can be run during a particular session, or there may be other practical constraints that introduce systematic differences into an experiment that can be handled during the design and analysis of the data collected during the experiment.

Blocking is a technique used in design of experiments methodology to deal with the systematic differences to ensure that all the factors of interest and interactions between the factors can be assessed in the design. When blocking occurs one or more of the interactions is likely to be confounded with the block effects but a good choice of blocking should hopefully ensure that it is a higher order interaction that would be challenging to interpret or not be expected to be important that is confounded.

The conf.design package in R is described by its author as *a small library contains a series of simple tools for constructing and manipulating confounded and fractional factorial designs*. The function **conf.design** can be used to *construct symmetric confounded factorial designs*.

A very simple example would be a three factor experiment where each factor has low and high settings (levels). If we wanted to divide the experiment into two blocks of four experimental units then we could confounded the block effect with the three way interaction between the factors. The following code would create the required design plan:

conf.design(rbind(c(1,1,1)), p=2, treatment.names = c("F1","F2","F3"))

The first argument is a matrix, with a single row in this case as there are only two blocks, which specifies the levels of the factors for the effect to be confounded with the blocks. The output from this function call is:

Blocks F1 F2 F3 1 0 0 0 0 2 0 1 1 0 3 0 1 0 1 4 0 0 1 1 5 1 1 0 0 6 1 0 1 0 7 1 0 0 1 8 1 1 1 1

This shows two blocks, labelled 0 and 1, and the settings of the experiments to run in each block. In the first block the four factor combinations would be:

- F1 low, F2 low, and F3 low.
- F1 high, F2 high, and F3 low.
- F1 high, F2 low, and F3 high.
- F1 low, F2 high, and F3 high.

The remaining four combinations are use in the second block of experiments.

**leave a comment**for the author, please follow the link and comment on his blog:

**Software for Exploratory Data Analysis and Statistical Modelling**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...