Drawing BIBDs with agricolae
We can also use agricolae
to draw BIBDs. design.bib()
takes, at minimum, the treatments (treats
), an integer k
corresponding to the number of levels of the blocks, and a seed
as inputs.
The main thing you should notice about a BIBD is that not every treatment will be used in each block (column) of the output.
From the video and the last exercise, however, you know that sometimes a BIBD isn't valid and that you have to do a little math to be sure your BIBD design is possible. design.bib()
will return an error message letting you know if a design is not valid.
Let's draw a few BIBDs with agricolae
so we can see the different warning messages and errors the package provides.
This exercise is part of the course
Experimental Design in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create my_design_bibd_1
___ <- design.bib(LETTERS[1:3], k = ___, seed = ___)