dcovary
Doptimal design with fixed covariates
Syntax
dCV = dcovary(nfactors,fixed)
[dCV,X] = dcovary(nfactors,fixed)
[dCV,X] = dcovary(nfactors,fixed,model
)
[dCV,X] = dcovary(___,param1
,val1
,param2
,val2
,...)
Description
dCV = dcovary(nfactors,fixed)
uses
a coordinateexchange algorithm to generate a Doptimal
design for a linear additive model with nfactors
factors,
subject to the constraint that the model include the fixed covariate
factors in fixed
. The number of runs in the design
is the number of rows in fixed
. The design dCV
augments fixed
with
initial columns for treatments of the model terms.
[dCV,X] = dcovary(nfactors,fixed)
also
returns the design matrix X
associated with the
design.
[dCV,X] = dcovary(nfactors,fixed,
uses
the linear regression model specified in model
)model
. model
is
one of the following:
'linear'
— Constant and linear terms. This is the default.'interaction'
— Constant, linear, and interaction terms'quadratic'
— Constant, linear, interaction, and squared terms'purequadratic'
— Constant, linear, and squared terms
The order of the columns of X
for a full
quadratic model with n terms is:
The constant term
The linear terms in order 1, 2, ..., n
The interaction terms in order (1, 2), (1, 3), ..., (1, n), (2, 3), ..., (n – 1, n)
The squared terms in order 1, 2, ..., n
Other models use a subset of these terms, in the same order.
Alternatively, model
can be a matrix
specifying polynomial terms of arbitrary order. In this case, model
should
have one column for each factor and one row for each term in the model.
The entries in any row of model
are powers
for the factors in the columns. For example, if a model has factors X1
, X2
,
and X3
, then a row [0 1 2]
in model
specifies
the term (X1.^0).*(X2.^1).*(X3.^2)
. A row of all
zeros in model
specifies a constant term,
which can be omitted.
[dCV,X] = dcovary(___,
specifies additional parameter/value pairs for the design. Valid parameters and their values are
listed in the following table.param1
,val1
,param2
,val2
,...)
Parameter  Value 

'AvoidDuplicates'  Flag to specify whether 
'Bounds'  Lower and upper bounds for each factor, specified as
a 
'CategoricalVariables'  Indices of categorical predictors. 
'Display'  Either 
'ExcludeFcn'  Handle to a function that excludes undesirable runs.
If the function is f, it must support the syntax b = f(S),
where S is a matrix of treatments with 
'InitialDesign'  Initial design as an 
'NumLevels'  Vector of number of levels for each factor. 
'MaxIterations'  Maximum number of iterations. The default is 
'Options'  The value is a structure that contains options specifying
whether to compute multiple tries in parallel, and specifying how
to use random numbers when generating the starting points for the
tries. Create the options structure with

'NumTries'  Number of times to try to generate a design from a new
starting point. The algorithm uses random points for each try, except
possibly the first. The default is 