As introduced in “Controlling what you can – randomisation and blocking in experimental design”, designing experiments well is extremely important. Through careful design and strategies such as randomization and design, uncontrolled factors that could potentially unduly influence the results of an analysis can be accounted for.
Extending the idea of blocking, when there is an equal number of blocks and treatments it is possible to use an experimental design called Latin Squares which allows the separation of an additional factor without a large increase in the number of experiments performed. To explain this situation and how this works, take the following example scenario:
Say you want to compare the percentage efficiency of different chelating agents in extracting a metal ion from aqueous solution.
- Suppose we wish to study the effects of three different chelating agents (A-C); our treatment.
- We can run three experiments per day, and want to run our analysis for three different days (1-3); our blocks.
- One could carry out a randomized block design, randomizing the order that each treatment is investigated for each day, BUT in this scenario, the time of day at which the measurements were made (a potential uncontrolled factor) is not accounted for.
- Because there are equal numbers of treatments and blocks (in this case three), then we can implement a Latin Square design.
- A Latin Square design allows the separation of an additional factor (in this case the time of day).
A Latin Square design is where each treatment appears once in each row and once in each column, i.e.:
If there are more than three blocks and treatments a number of Latin square designs are possible.
To generate a Latin Square design, the code is:
require(“magic”) rlatin(n = 1, size = 3) The term "rlatin()” asks R to generate a Latin Square design and give this as the output.
- The term “
n” tells R the number to Latin Square designs to create (in this case 1). - The term “
size” tells R how many treatments/blocks there are (in this case 3).
The output in the console will be a Latin Square design that can then be used in your experiment.
The output from the above code is:
> rlatin(n = 1, size = 3)
[,1] [,2] [,3]
[1,] 1 3 2
[2,] 3 2 1
[3,] 2 1 3Once you have run your experiment according to the Latin Squares design, the results can be analysed using ANOVA in the same way as shown previously see “Two-Way ANOVA”, with “treatment order” as another factor included in the analysis.