searchCrossOverDesign {Crossover}R Documentation

Search for a Cross-Over Design

Description

Search for a Cross-Over Design

Usage

searchCrossOverDesign(
  s,
  p,
  v,
  model = "Standard additive model",
  eff.factor = 1,
  v.rep,
  balance.s = FALSE,
  balance.p = FALSE,
  verbose = 0,
  model.param = list(),
  n = c(5000, 20),
  jumps = c(5, 50),
  start.designs,
  random.subject = FALSE,
  contrast,
  correlation = NULL,
  rho = 0
)

Arguments

s

Number of sequences.

p

Number of periods.

v

Number of treatments.

model

Model - one of the following: "Standard additive model" (2), "Second-order carry-over effects" (3), "Full set of interactions" (3), "Self-adjacency model" (3), "Placebo model" (2), "No carry-over into self model" (2), "Treatment decay model" (2), "Proportionality model" (1), "No carry-over effects" (0). The number in parentheses is the number of different efficiency factors that can be specified.

eff.factor

Weights for different efficiency factors. (Not used in the moment.)

v.rep

Integer vector specifying how often each treatment should be assigned (sum must equal s*p).

balance.s

Boolean specifying whether to allocate the treatments as equally as possible to each sequence (can result in loss of efficiency).

balance.p

Boolean specifying whether to allocate the treatments as equally as possible to each period (can result in loss of efficiency).

verbose

Level of verbosity, a number between 0 and 10. The default verbose=0 does not print any output, while verbose=10 prints any available notes.

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.

n

n=c(n1,n2) with n1 the number of hill climbing steps per trial and n2 the number of searches from random start matrices.

jumps

To reduze the possibility of the hill-climbing algorithm to get stuck in local extrema long jumps of distance d can be performed all k steps. This can be specified as long.jumps=c(d,k). If long.jumps has only length 1 the default for k is 50. If after k/2 hill-climbing steps the old design criterion is not enhanced (or at least reached), the algorithm returns to the design from before the jump.

start.designs

A single design or a list of start designs. If missing or to few start designs are specified (with regard to parameter n which specifies a number of 20 start designs as default) the start designs are generated randomly with the sample function. Alternatively start.designs="catalog" can be used to take start designs from the catalog to which random designs are added till n2 start designs are at hand.

random.subject

Should the subject effects be random (random.subject=TRUE) or fixed effects (random.subject=FALSE).

contrast

Contrast matrix to be optimised. TODO: Example and better explanation for contrast.

correlation

Either a correlation matrix for the random subject effects or one of the following character strings: "equicorrelated", "autoregressive"

rho

Parameter for the correlation if parameter correlation is a character string.

Details

See the vignette of this package for further details.

Value

Returns the design as an integer matrix.

Author(s)

Kornelius Rohmeyer rohmeyer@small-projects.de

References

John, J. A., Russell, K. G., & Whitaker, D. (2004). CrossOver: an algorithm for the construction of efficient cross-over designs. Statistics in medicine, 23(17), 2645-2658.

Examples


## Not run: 
x <- searchCrossOverDesign(s=9, p=5, v=4, model=4)

jumps <- c(10000, 200) # Do a long jump (10000 changes) every 200 steps
n <- c(1000, 5)        # Do 5 trials with 1000 steps in each trial
result <- searchCrossOverDesign(s=9, p=5, v=4, model=4, jumps=jumps, n=n)
plot(result)

## End(Not run)



[Package Crossover version 0.1-22 Index]