Description Usage Arguments Details Value Author(s) References Examples
View source: R/seq_balmin_rmd.R
Specifies cross-over designs from Afsarinejad (1983).
1 2 | seq_balmin_rmd(D = 2, J = 2, labels = 0:(D - 1), as_matrix = T,
summary = T)
|
D |
The number of treatments. Must be a single
|
J |
The number of periods. Must be a single |
labels |
A |
as_matrix |
A |
summary |
A |
seq_balmin_rmd()
supports the specification of cross-over designs from
Afsarinejad (1983). Designs for any number of treatments (see D
) are
supported, for any chosen treatment labels (see labels
). The number of
periods (see J
) can be any number such that
(D - 1)/(J - 1) is
a positive integer. In addition, the designs can be returned in
matrix
or tibble
form (see
as_matrix
).
Precisely, a balanced minimal repeated measurement design is returned. The sequences are incomplete, i.e., no sequence contains all of the treatments. The design is balanced for carryover effects but will in general not be a balanced block design. A necessary and sufficient condition for the existence of such a design is that (D - 1)/(J - 1) is a positive integer: this is therefore enforced by the function. The number of sequences, K, in the resulting design is D(D - 1)/(J - 1). 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.
Afsarinejad K (1983) Balanced repeated measurements designs. Biometrika 70:199-204.
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.
1 2 3 4 5 6 | # Afsarinejad (1983) design for four treatments and two periods
balmin_rmd <- seq_balmin_rmd()
# Using different labels
balmin_rmd_ABCD <- seq_balmin_rmd(labels = LETTERS[1:4])
# Returning in tibble form
balmin_rmd_tibble <- seq_balmin_rmd(as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.