Description Usage Arguments Details Value Author(s) References Examples
View source: R/seq_clatworthy.R
Specifies cross-over designs from Clatworthy (1973).
1 2 | seq_clatworthy(type = "R", selection = 1, labels, as_matrix = T,
summary = T)
|
type |
A |
selection |
A |
labels |
A |
as_matrix |
A |
summary |
A |
seq_clatworthy()
supports the specification of designs from
Clatworthy (1973). Designs for a large array of values of the number of
treatments and periods are available (accessible by setting selection
and type
carefully), for any chosen treatment labels (see
labels
). In addition, the designs can be returned in
matrix
or tibble
form (see
as_matrix
).
Precisely, type
must be set as one of "R"
, "S"
, and
"SR"
. Then, selection
can take one of a particular set of
numeric
or character
values. The best
way to ascertain which values are allowed is to use the utility function
summary_seq_clatworthy
. 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.
Clatworthy WH, Cameron JM, Speckman JA (1973) Tables of two-associate-class partially balanced designs. US Government Printing Office.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # A selection of designs for four treatments from Clatworthy (1973)
clatworthy1 <- seq_clatworthy()
clatworthy2 <- seq_clatworthy(selection = 2)
clatworthy3 <- seq_clatworthy(selection = 3)
clatworthy4 <- seq_clatworthy(selection = 4)
# Using different labels
clatworthy1_ABCD <- seq_clatworthy(labels = LETTERS[1:4])
clatworthy2_ABCD <- seq_clatworthy(selection = 2, labels = LETTERS[1:4])
clatworthy3_ABCD <- seq_clatworthy(selection = 3, labels = LETTERS[1:4])
clatworthy4_ABCD <- seq_clatworthy(selection = 4, labels = LETTERS[1:4])
# Returning in tibble form
clatworthy1_tibble <- seq_clatworthy(as_matrix = F)
clatworthy2_tibble <- seq_clatworthy(selection = 2, as_matrix = F)
clatworthy3_tibble <- seq_clatworthy(selection = 3, as_matrix = F)
clatworthy4_tibble <- seq_clatworthy(selection = 4, as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.