Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Candidate set generation

`dC = candgen(nfactors,'`

* model*')

[dC,C] = candgen(nfactors,'

`model`

[...] = candgen(nfactors,'

`model`

`Name`

`value`

`dC = candgen(nfactors,'`

generates
a candidate set * model*')

`dC`

of treatments appropriate for
estimating the parameters in the `model`

`nfactors`

factors. `dC`

has `nfactors`

columns
and one row for each candidate treatment. `model`

`'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

Alternatively, * model* can be a matrix
specifying polynomial terms of arbitrary order. In this case,

`model`

`model`

`X1`

, `X2`

,
and `X3`

, then a row `[0 1 2]`

in `model`

`(X1.^0).*(X2.^1).*(X3.^2)`

. A row of all
zeros in `model`

`[dC,C] = candgen(nfactors,'`

also
returns the design matrix * model*')

`C`

evaluated at the treatments
in `dC`

. The order of the columns of `C`

for
a full quadratic model with 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.

Pass `C`

to `candexch`

to
generate a *D*-optimal design using a coordinate-exchange
algorithm.

`[...] = candgen(nfactors,'`

specifies
one or more optional name/value pairs for the design. Valid parameters
and their values are listed in the following table. Specify * model*','

`Name`

`value`

`Name`

Name | Value |
---|---|

`bounds` | Lower and upper bounds for each factor, specified as
a |

`categorical` | Indices of categorical predictors. |

`levels` | Vector of number of levels for each factor. |

The following example uses `rowexch`

to
generate a five-run design for a two-factor pure quadratic model using
a candidate set that is produced internally:

dRE1 = rowexch(2,5,'purequadratic','tries',10) dRE1 = -1 1 0 0 1 -1 1 0 1 1

The same thing can be done using `candgen`

and `candexch`

in sequence:

[dC,C] = candgen(2,'purequadratic') % Candidate set, C dC = -1 -1 0 -1 1 -1 -1 0 0 0 1 0 -1 1 0 1 1 1 C = 1 -1 -1 1 1 1 0 -1 0 1 1 1 -1 1 1 1 -1 0 1 0 1 0 0 0 0 1 1 0 1 0 1 -1 1 1 1 1 0 1 0 1 1 1 1 1 1 treatments = candexch(C,5,'tries',10) % Find D-opt subset treatments = 2 1 7 3 4 dRE2 = dC(treatments,:) % Display design dRE2 = 0 -1 -1 -1 -1 1 1 -1 -1 0

Was this topic helpful?