dcm.design {choiceDes}  R Documentation 
Optimal fractional factorial design
Description
Generate an optimal fractional factorial design given vectors of factor lengths.
Usage
dcm.design(cand, nb, sets, alts, fname=NULL, Rd=20, print=TRUE)
Arguments
cand 
A vector of factor lengths, or a list containing vectors of factor lengths if a combinatorial design is needed. 
nb 
The number of blocks or versions in the final design. 
sets 
The number of choice sets in each version of the final design. 
alts 
The number of alternatives in each choice set. 
fname 
A character string, usually ending in ".txt", indiciating the name of the file containing the levelscoded design. 
Rd 
The number of repeats used by the initial design and blocking algorithms. See arg

print 
Boolean indicating whether there is output to the console during execution. 
Details
Generates balanced and blocked choice sets from one or more specified fullfactorial candidate
set(s) using a modified Federov (1972) algorithm. See optFederov
in AlgDesign (Wheeler, 2004)
for a more complete description of the algorithm. Starting points are chosen randomly (as opposed to by
nullification) and may be seeded using set.seed
. The D
criterion is used for optimization.
See optBlock
for a description of the blocking method used.
If fname
is not NULL
a tabdelimited plaintext file is generated in the working
directory containing the levelscoded design.
Large problems will complete faster by setting Rd
to a smaller value. However, this may come at the
expense of a more efficient design.
Value
levels 
A data frame consisting of the levelscoded design with blocks stacked in order. Variables for card, version and task are appended. 
effects 
A list of the effectscoded, blocked design and diagnostics. See 
d.eff 
A list containing 
References
Federov, V.V. (1972). Theory of optimal experiments. Academic Press, New York.
Wheeler, R.E. (2004). AlgDesign. The R project for statistical computing. (http://www.rproject.org).
See Also
optFederov
, optBlock
Examples
## Example 1:
## design from a single candidate set
levs1 < c(3,3,5,4)
des < dcm.design(levs1, 10, 6, 2)
## Example 2:
## combinatorial design from more than one candidate set
levs2 < list(c(3,3), c(5,4))
des < dcm.design(levs2, 10, 6, 2)