Description Usage Arguments Details Value References See Also
View source: R/add_carryover_data.R
Adds carry-over information to a cross-over dataset.
1 | add_carryover_data(data, summary = T)
|
data |
A |
summary |
A |
add_carryover_data()
supports the addition of a column to a cross-over
dataset describing the first order carryover information. Precisely, a
dataset of class xover_data
is provided (see data
) and the new
column is constructed by determining for each outcome variable the treatment
received by that subject in the previous period. Those outcome variables from
period one are assigned the first level of data$treatment
.
Note that datasets can be converted to class xover_data
using
as_xover_data
.
A tibble
of class xover_data
.
Specifically, the input dataset data
with the addition of a new column
carryover
, stored as a factor with the same levels as
data$treatment
. Note that if data$carryover
is already present
it will be overwritten.
Jones B, Kenward MG (2014) Design and Analysis of Cross-Over Trials. Chapman and Hall: London, 3rd Edition.
as_xover_data
for converting datasets to class
xover_data
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.