Description Usage Arguments Details Value Author(s) References Examples
View source: R/seq_patterson_lucas.R
Specifies cross-over designs from Patterson and Lucas (1962).
1 2 | seq_patterson_lucas(selection = 1, labels, as_matrix = T,
summary = T)
|
selection |
A single |
labels |
A |
as_matrix |
A |
seq_patterson_lucas()
supports the specification of designs from
Patterson and Lucas (1962). Designs for three 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, designs are indexed using the argument selection
, which can
take the following values for the following numbers of treatments:
D = 3
: 1, 30, and 31;
D = 4
: 3-5, 32-35, and 153;
D = 5
: 7-10, 18, 36-40, 125, 126, 131, 132, and 154;
D = 6
: 12, 13, 15, 41, 42, 99-101, 133-135, and 155;
D = 7
: 16, 17, 19-23, 43-49, and 86;
D = 8
: 102-105, 136-138, and 156;
D = 9
: 106, 107, 127, 128, and 139-141.
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.
Patterson HD, Lucas HL (1962) Change-over designs. North Carolina Agricultural Experiment Station. Tech Bull 147.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Patterson and Lucas (1962) designs for three treatments
patterson_lucas1 <- seq_patterson_lucas()
patterson_lucas30 <- seq_patterson_lucas(selection = 30)
patterson_lucas31 <- seq_patterson_lucas(selection = 31)
# Using different labels
patterson_lucas1_ABC <- seq_patterson_lucas(labels = LETTERS[1:3])
patterson_lucas30_ABC <- seq_patterson_lucas(selection = 30,
labels = LETTERS[1:3])
patterson_lucas31_ABC <- seq_patterson_lucas(selection = 31,
labels = LETTERS[1:3])
# Returning in tibble form
patterson_lucas1_tibble <- seq_patterson_lucas(as_matrix = F)
patterson_lucas30_tibble <- seq_patterson_lucas(selection = 30,
as_matrix = F)
patterson_lucas31_tibble <- seq_patterson_lucas(selection = 31,
as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.