Description Usage Arguments Details Value See Also Examples
Converts a given matrix
to an object of
class
xover_seq
.
1 | as_xover_seq(sequences, as_matrix = T, summary = T)
|
sequences |
A |
as_matrix |
A |
summary |
A |
as_xover_seq()
supports the conversion of a matrix
(see sequences
) in to an object of class
xover_seq
, for use with other relevant functions within
xover
. The sequences can be returned in
matrix
or tibble
form (see
as_matrix
).
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). The object will be of
class
xover_seq
.
The seq_#()
functions within xover
.
1 2 3 4 5 6 | # An example cross-over design
sequences <- matrix(c(0, 1, 0, 1, 0, 1), 2, 3, byrow = T)
# Construct a cross-over design matrix of class xover_seq
sequences_matrix <- as_xover_seq(sequences)
# Return a tibble of class xover_seq
sequences_tibble <- as_xover_seq(sequences, as_matrix = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.