Learn R Programming

MOODE (version 1.1.0)

Search: Searching for a multi-objective optimal completely randomised design.

Description

Performing search for a (nearly) optimum factorial design, optimising with respect to a specified compound criterion.

Usage

Search(
  mood.object,
  algorithm = c("ptex", "coordex"),
  parallel = FALSE,
  verbose = TRUE
)

Value

Updated object of class mood containing the outputs generated by the search:

  • X.design Design matrix.

  • df The number of pure error degrees of freedom.

  • X1 Primary model matrix for the found (nearly-) optimum design.

  • X2 Model matrix of potential terms for the found (nearly-) optimum design.

  • compound.value The compound criterion value of the (nearly-) optimum design.

  • criteria.values Component criteria values of the (nearly-) optimum design.

  • path The "path" of compound criterion values of the optimum designs obtained after for each random start.

  • time Computation time.

  • algorithm Point exchange or coordinate exchange used to find the design?

  • parallel Were different runs of the algorithm performed across different CPU cores (TRUE/FALSE)

Arguments

mood.object

Object of class mood, generated by mood function, containing the parameters of the experiment, the compound criterion and search parameters

algorithm

Parameter specifying the search algorithm. If ptex (default for \(K<=4\)), the point-exchange algorithm is used, and if coordex (default for \(K>4\)), the coordinate-exchange.

parallel

If TRUE use the doFuture package to run independent iterations of the algorithm in parallel using foreach. Requires doFuture library to be installed and a Future plan to be specified. See examples.

verbose

If TRUE, progress messages through the search iterations are shown.

Details

Search takes the mood object as an input with all the parameters of the experiment. Runs a point-exchange or a coordinate-exchange algorithm, returns design and model matrices, computation time and criteria values. See KoutraMOODEMOODE for examples of using parallel = TRUE.

References

See Also

mood

Examples

Run this code

example1 <- mood(K = 2, Levels = 3, Nruns = 10, criterion.choice = "GDP", 
                kappa = list(kappa.Ds = 1./3, kappa.DP = 1./3, kappa.LoF = 1./3), 
                control = list(tau2 = 0.1), 
                model_terms = list(primary.model = "first_order", 
                potential.terms = c("x12", "x22", "x1x2")))
# Using point exchange
Search_point <- Search(example1, algorithm = 'ptex')
Search_point
# Using coordinate exchange (the default for K>4)
Search_coord <- Search(example1)
Search_coord

Run the code above in your browser using DataLab