is_carryover_balanced: Check for carryover balance

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/is_carryover_balanced.R

Description

Checks whether a cross-over design is balanced for first order carryover effects.

Usage

1
is_carryover_balanced(sequences, pre_period = F, summary = T)

Arguments

sequences

A cross-over design; an object of class xover_seq.

pre_period

A logical variable indicating whether a pre-period should be assumed. See Details for further information. Defaults to F.

summary

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

Details

is_carryover_balanced() supports the assessment of whether a cross-over design of class xover_seq (see sequences) is balanced for first order carryover effects (residual effects). The user is also able to specify whether there is a pre-period (see pre_period). That is, if there is a pre-period each subject experiences in the first period the residual effect of the treatment of the last period (i.e., the last period preceeds the first period).

Ultimately, a cross-over design is said to be balanced for first order carryover effects if each treatment is preceeded by all other treatments equally often, and if no treatment is preceeded by itself.

Note that a cross-over design can be converted to be of class xover_seq using as_xover_seq.

Value

A logical variable indicating whether the design is balanced for first order carryover effects.

Author(s)

Based on code from the crossdes package by Oliver Sailer.

See Also

as_xover_seq for converting cross-over designs to class xover_seq.

Examples

1
2
3
4
5
6
# Check a three-treatment Latin square for carryover balance
latin    <- seq_latin(D = 3)
is_carryover_balanced(latin)
# Check a three-treatment Williams design for carryover balance
williams <- seq_williams(D = 3)
is_carryover_balanced(williams)

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