add_carryover_data: Add carryover information

Description Usage Arguments Details Value References See Also

View source: R/add_carryover_data.R

Description

Adds carry-over information to a cross-over dataset.

Usage

1

Arguments

data

A tibble of class xover_data.

summary

A logical variable indicating whether a summary of the function's progress should be printed to the console. Defaults to T.

Details

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.

Value

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.

References

Jones B, Kenward MG (2014) Design and Analysis of Cross-Over Trials. Chapman and Hall: London, 3rd Edition.

See Also

as_xover_data for converting datasets to class xover_data.


mjg211/xover documentation built on Oct. 16, 2019, 10:46 a.m.