searchCrossOverDesign {Crossover}  R Documentation 
Search for a CrossOver Design
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
)
s 
Number of sequences. 
p 
Number of periods. 
v 
Number of treatments. 
model 
Model  one of the following: "Standard additive model" (2), "Secondorder carryover effects" (3), "Full set of interactions" (3), "Selfadjacency model" (3), "Placebo model" (2), "No carryover into self model" (2), "Treatment decay model" (2), "Proportionality model" (1), "No carryover 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

model.param 
List of additional model specific parameters. In the
moment these are 
n 

jumps 
To reduze the possibility of the hillclimbing algorithm to get
stuck in local extrema long jumps of distance d can be performed all
k steps. This can be specified as 
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

random.subject 
Should the subject effects be random ( 
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 
See the vignette of this package for further details.
Returns the design as an integer matrix.
Kornelius Rohmeyer rohmeyer@smallprojects.de
John, J. A., Russell, K. G., & Whitaker, D. (2004). CrossOver: an algorithm for the construction of efficient crossover designs. Statistics in medicine, 23(17), 26452658.
## 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)