Skip to Main Content Skip to Search
Product Documentation

candexch - D-optimal design from candidate set using row exchanges

Syntax

rlist = candexch(C,nrows)
rlist = candexch(C,nrows,Name,Value)

Description

rlist = candexch(C,nrows) uses a row-exchange algorithm to select a D-optimal design from the candidate set C.

rlist = candexch(C,nrows,Name,Value) generates a D-optimal design with additional options specified by one or more Name,Value pair arguments.

Input Arguments

C

N-by-P matrix containing the values of P model terms at each of N points.

nrows

The desired number of rows in the design.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'display'

When 'on', displays iteration number. Disable the display by setting to 'off'.

Default: 'on', except when the UseParallel option is 'always'

'init'

nrows-by-P matrix giving an initial design.

Default: A random subset of the rows of C

'maxiter'

Maximum number of iterations, a positive integer.

Default: 10

'options'

A structure that specifies whether to run in parallel, and specifies the random stream or streams. Create the options structure with statset. Option fields:

  • UseParallel — Set to 'always' to compute in parallel. Default is 'never'.

  • UseSubstreams — Set to 'always' to compute in parallel in a reproducible fashion. Default is 'never'. To compute reproducibly, set Streams to a type allowing substreams: 'mlfg6331_64' or 'mrg32k3a'.

  • Streams — A RandStream object or cell array of such objects. If you do not specify Streams, candexch uses the default stream or streams. If you choose to specify Streams, use a single object except in the case

    • You have an open MATLAB pool

    • UseParallel is 'always'

    • UseSubstreams is 'never'

    In that case, use a cell array the same size as the MATLAB pool.

For more information on using parallel computing, see Parallel Statistics.

Default: []

'start'

An nobs-by-p matrix of factor settings, specifying a set of nobs fixed design points to include in the design. candexch finds nrows additional rows to add to the start design. The parameter provides the same functionality as the daugment function, using a row-exchange algorithm rather than a coordinate-exchange algorithm.

Default: []

'tries'

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.

Default: 1

Output Arguments

rlist

Vector of length nrows listing the selected rows.

Examples

This example shows how to generate a D-optimal design when there is a restriction on the candidate set, so the rowexch function isn't appropriate.

F = (fullfact([5 5 5])-1)/4; % factor settings in unit cube
T = sum(F,2)<=1.51;         % find rows matching a restriction
F = F(T,:);                 % take only those rows
C = [ones(size(F,1),1) F F.^2]; 
                            % compute model terms including
                            % a constant and all squared terms
R = candexch(C,12);         % find a D-optimal 12-point subset
X = F(R,:);                 % get factor settings

Algorithms

candexch selects a starting design X at random, and uses a row-exchange algorithm to iteratively replace rows of X by rows of C in an attempt to improve the determinant of X'*X.

Alternatives

The rowexch function also generates D-optimal designs using a row-exchange algorithm, but it automatically generates a candidate set that is appropriate for a specified model. The daugment function augments a set of fixed design points using a coordinate-exchange algorithm; the 'start' parameter provides the same functionality using the row exchange algorithm.

See Also

candgen | cordexch | daugment | rowexch | x2fx

Tutorials

How To

  


 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS