Description Usage Arguments Details Value Author(s) References Examples
Specifies cross-over designs from Lewis et al. (1988).
1 2 |
D |
The number of treatments. Must be either four, six, eight, or nine.
Defaults to |
selection |
A single |
labels |
A |
as_matrix |
A |
summary |
A |
seq_lewis()
supports the specification of designs from Lewis
et al. (1988). Designs for four, six, eight, and 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 D
equal to four, six, eight and nine, there are six,
eight, four, and two sets of sequences available respectively (accessible by
setting selection
equal to one through eight as appropriate).
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.
Lewis SM, Fletcher DJ, Matthews JNS (1988) Factorial cross-over designs in clinical trials. In Optimal Design and Analysis of Experiments, Eds: Dodge Y, Fedorov VV, Wynn HP, pp 133-140. Elsevier Science Publishers BV: North-Holland.
1 2 3 4 5 6 7 8 9 | # Lewis et al. (1988) designs for nine treatments
lewis1 <- seq_lewis(D = 9)
lewis2 <- seq_lewis(D = 9, selection = 2)
# Using different labels
lewis1_LETTERS <- seq_lewis(D = 9, labels = LETTERS[1:9])
lewis2_LETTERS <- seq_lewis(D = 9, selection = 2, labels = LETTERS[1:9])
# Returning in tibble form
lewis1_tibble <- seq_lewis(D = 9, as_matrix = F)
lewis2_tibble <- seq_lewis(D = 9, selection = 2, as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.