| makeDoe | R Documentation |
Make a design of experiment
makeDoe( levels, type = NULL, nTrials = NA, minTrials = NULL, search = FALSE, nRepeats = 5 )
levels |
A named list of vectors defining each attribute (the names)
and each level for each attribute (the vectors). For example, a design
with two attributes, "price" and "type", that each had three levels should
be defined as |
type |
The type of design. Defaults to |
nTrials |
The number of trials to be used in a fractional factorial
design. Defaults to |
minTrials |
If |
search |
If |
nRepeats |
Number of times the design search using
|
Returns a full factorial or fraction factorial design of experiment.
# Define the attributes and levels
levels <- list(
price = seq(1, 4, 0.5), # $ per pound
type = c('Fuji', 'Gala', 'Honeycrisp', 'Pink Lady', 'Red Delicious'),
freshness = c('Excellent', 'Average', 'Poor')
)
# Make a full-factorial design of experiment
doe <- makeDoe(levels)
# Make a fraction-factorial design of experiment based on D-efficiency
doe <- makeDoe(levels, type = "D", nTrials = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.