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 levels-coded design.

Rd

The number of repeats used by the initial design and blocking algorithms. See arg nRepeats in optFederov and optBlock for additional details

print

Boolean indicating whether there is output to the console during execution.

Details

Generates balanced and blocked choice sets from one or more specified full-factorial 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 tab-delimited plain-text file is generated in the working directory containing the levels-coded 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 levels-coded design with blocks stacked in order. Variables for card, version and task are appended.

effects

A list of the effects-coded, blocked design and diagnostics. See optBlock for additional details.

d.eff

A list containing D efficiency, the variance-covariance matrix, and parameter standard deviations from the effects-coded design. See dcm.design.effcy for additional details.

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.r-project.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)

[Package choiceDes version 0.9-3 Index]