design.efficiency: Create the design matrix, variance-covariance matrix, the...

View source: R/efficiency.R

design.efficiencyR Documentation

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) "Proportionality model", 9) "No carry-over effects".

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

Details

See the vignette of this package for further details.

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

Author(s)

Kornelius Rohmeyer rohmeyer@small-projects.de

References

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

Examples


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


Crossover documentation built on March 31, 2023, 9:50 p.m.