Description Usage Arguments Details Value Author(s) References Examples
View source: R/seq_davis_hall.R
Specifies cross-over designs from Davis and Hall (1969).
1 2 | seq_davis_hall(D = 6, selection = 1, labels = 0:(D - 1),
as_matrix = T, summary = T)
|
D |
The number of treatments. Must be either six, seven, eight, or nine.
Defaults to |
selection |
A single |
labels |
A |
as_matrix |
A |
summary |
A |
seq_davis_hall()
supports the specification of designs from
Davis and Hall (1969). Designs for six through nine treatments (see
D
) are supported, for any chosen treatment labels (see labels
).
In addition, the designs can be returned in matrix
or
tibble
form (see as_matrix
).
Precisely, for each supported value of D
, there are three designs
available (accessible by setting selection
equal to one, two, or
three). Ultimately, the
(k,j)th element of the
cross-over design matrix corresponds to the treatment a subject on the
kth sequence would receive in the
jth period.
Either a matrix
if as_matrix = T
(with
rows corresponding to sequences and columns to periods), or a
tibble
if as_matrix = F
(with rows corresponding
to a particular period on a particular sequence). In either case, the
returned object will have class xover_seq
.
Based on data from the Crossover
package by
Kornelius Rohmeyer.
Davis AW, Hall WB (1969) Cyclic change-over designs. Biometrika 56:283-93.
1 2 3 4 5 6 7 8 9 10 11 12 | # Davis and Hall (1969) designs for six treatments
davis_hall1 <- seq_davis_hall()
davis_hall2 <- seq_davis_hall(selection = 2)
davis_hall3 <- seq_davis_hall(selection = 3)
# Using different labels
davis_hall1_ABCDEF <- seq_davis_hall(labels = LETTERS[1:6])
davis_hall2_ABCDEF <- seq_davis_hall(selection = 2, labels = LETTERS[1:6])
davis_hall3_ABCDEF <- seq_davis_hall(selection = 3, labels = LETTERS[1:6])
# Returning in tibble form
davis_hall1_tibble <- seq_davis_hall(as_matrix = F)
davis_hall2_tibble <- seq_davis_hall(selection = 2, as_matrix = F)
davis_hall3_tibble <- seq_davis_hall(selection = 3, as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.