seq_russell: Russell (1991) cross-over design specification

Description Usage Arguments Details Value Author(s) References Examples

View source: R/seq_russell.R

Description

Specifies cross-over designs from Russell (1991).

Usage

1
seq_russell(D = 5, labels = 0:(D - 1), as_matrix = T, summary = T)

Arguments

D

The number of treatments. Must be either five or seven. Defaults to 5.

labels

A vector of labels for the treatments. Should be of length D, containing unique elements. Defaults to 0:(D - 1).

as_matrix

A logical variable indicating whether the design should be returned as a matrix, or a tibble. Defaults to T.

summary

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

Details

seq_russell() supports the specification of designs from Russell (1991). Designs for five or seven 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, 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.

Value

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.

Author(s)

Based on data from the Crossover package by Kornelius Rohmeyer.

References

Russell KR (1991) The construction of good change-over designs when there are fewer units than treatments. Biometrika 78:305-313

Examples

1
2
3
4
5
6
# Russell (1991) design for five treatments
russell        <- seq_russell()
# Using different labels
russell_ABCDE  <- seq_russell(labels = LETTERS[1:5])
# Returning in tibble form
russell_tibble <- seq_russell(as_matrix = F)

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