| Statistics Toolbox | Search  Help Desk |
| cordexch | Examples See Also |
D-optimal design of experiments - coordinate exchange algorithm.
Syntax
settings = cordexch(nfactors,nruns)
[settings,X] = cordexch(nfactors,nruns)
[settings,X] = cordexch(nfactors,nruns,'model')
Description
settings = cordexch(nfactors,nruns) generates the factor settings matrix, settings, for a D-optimal design using a linear additive model with a constant term. settings has nruns rows and nfactors columns.
[settings,X] = cordexch(nfactors,nruns) also generates the associated design matrix, X.
[settings,X] = cordexch(nfactors,nruns,'model') produces a design for fitting a specified regression model. The input, 'model', can be one of these strings:
'interaction' - includes constant, linear, and cross product terms.
'quadratic' - interactions plus squared terms.
'purequadratic' - includes constant, linear and squared terms.
Example
The D-optimal design for two factors in nine run using a quadratic model is the 32 factorial as shown below:settings = cordexch(2,9,'quadratic')
settings =
-1 1
1 1
0 1
1 -1
-1 -1
0 -1
1 0
0 0
-1 0
See Also
rowexch,daugment,dcovary,hadamard,fullfact,ff2n