randomize | R Documentation |
Generate an incomplete block A-optional design. The function is optimized for incomplete blocks of three, but it will also work with comparisons of any other number of options. The design strives for approximate A optimality, this means that it is robust to missing observations. It also strives for balance for positions of each option. Options are equally divided between first, second, third, etc. position. The strategy is to create a "pool" of combinations that does not repeat combinations and is A-optimal. Then this pool is ordered to make subsets of consecutive combinations also relatively balanced and A-optimal
randomize(
npackages,
itemnames,
ncomp = 3,
availability = NULL,
props = NULL,
...
)
npackages |
an integer for the number of incomplete blocks to be generated |
itemnames |
a character for the name of items tested in the experiment |
ncomp |
an integer for the number of items to be assigned to each incomplete block |
availability |
optional, a vector with integers indicating the number of plots available for each itemnames |
props |
optional, a numeric vector with the desired proportions for each itemnames |
... |
additional arguments passed to methods |
A dataframe with the randomized design
Jacob van Etten
Bailey and Cameron (2004). Combinations of optimal designs. https://webspace.maths.qmul.ac.uk/l.h.soicher/designtheory.org/library/preprints/optimal.pdf
ncomp = 3
npackages = 20
itemnames = c("apple","banana","grape","mango", "orange")
availability = c(5, 8, 50, 50, 50)
randomize(ncomp = ncomp,
npackages = npackages,
itemnames = itemnames)
randomize(ncomp = ncomp,
npackages = npackages,
itemnames = itemnames,
availability = availability)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.