Description Usage Arguments Details Value Author(s) References Examples
Specifies Williams cross-over designs.
1 | seq_williams(D = 2, labels = 0:(D - 1), as_matrix = T, summary = T)
|
D |
The number of treatments. Must be a single
|
labels |
A |
as_matrix |
A |
summary |
A |
seq_williams()
supports the specification of Williams designs.
Sequences for any number of 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, Williams designs are (generalized) Latin squares that are balanced for first order carryover effects. Generally, carryover balance is achieved with very few sequences. 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 code from the crossdes
package by
Oliver Sailer.
Jones B, Kenward MG (2014) Design and Analysis of Cross-Over Trials. Chapman and Hall: London, 3rd Edition.
Wakeling IN, MacFie HJH (1995) Designing consumer trials balanced for first and higher orders of carry-over effect when only a subset of k samples from t may be tested. Food Qual Prefer 6:299-308.
Williams EJ (1949) Experimental designs balanced for the estimation of residual effects of treatments. Aust J Sci Res Ser A 2:149-168.
1 2 3 4 5 6 | # A Williams design for three treatments
williams <- seq_williams(D = 3)
# Using different labels
williams_ABC <- seq_williams(D = 3, labels = LETTERS[1:3])
# Returning in tibble form
williams_tibble <- seq_williams(D = 3, as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.