Learn R Programming

Crossover (version 0.1-13)

design.efficiency: Create the design matrix, variance-covariance matrix, the variance of each pairwise comparison and the efficicency of each pairwise comparison for a cross-over design

Description

Function to read in a cross-over design and create the design matrix X, the variance of each pairwise comparison and the efficicency of each pairwise comparison.

Usage

design.efficiency(design, model = 1, model.param = list(),
  v = length(levels(as.factor(design))))

Arguments

design
Cross-over design.
model
Model - one of the following: 1) "Standard additive model", 2) "Second-order carry-over effects", 3) "Full set of interactions", 4) "Self-adjacency model", 5) "Placebo model", 6) "No carry-over into self model", 7) "Treatment decay model", 8) "Proportiona
model.param
List of additional model specific parameters. In the moment these are ppp, the proportionality parameter for the proportionality model, and placebos, the number of placebo treatments in the placebo model.
v
Number of treatments

Value

  • A list with the following elements:
    • xmat Design matrix for the given model (including subject and period effects)
    • var.trt.pair.adj Matrix of treament difference variances
    • eff.trt.pair.adj Matrix of treament difference efficiencies

Details

See the vignette of this package for further details.

References

Jones, B., & Kenward, M. G. (2003). Design and analysis of cross-over trials (Vol. 98). Chapman & Hall.

Examples

Run this code
design.efficiency(getDesign("fletcher1"))
design.efficiency(getDesign("fletcher1"), model=7)
design.efficiency(getDesign("switchback4t"), model=7)

Run the code above in your browser using DataLab