# WFMult: Master function for the cocktail algorithm, that calls the... In optedr: Calculating Optimal and D-Augmented Designs

## Description

Depending on the `Criterion` the cocktail algorithm for the chosen criterion is called, and the necessary parameters for the functions are given from the user input.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16``` ```WFMult( init_design, grad, Criterion, par_int = NA, matB = NA, min, max, grid.length, join_thresh, delete_thresh, k, delta_weights, tol, tol2 ) ```

## Arguments

 `init_design` with the initial design for the algorithm. A dataframe with two columns: `Point` contains the support points of the design. `Weight` contains the corresponding weights of the `Point`s. `grad` function of partial derivatives of the model. `Criterion` character with the chosen optimality criterion. Can be one of the following: 'D-Optimality' 'Ds-Optimality' 'A-Optimality' 'I-Optimality' `par_int` numeric vector with the index of the `parameters` of interest. Only necessary when the `Criterion` chosen is 'Ds-Optimality'. `matB` optional matrix of dimensions k x k, integral of the information matrix of the model over the interest region. `min` numeric value with the inferior bound of the space of the design. `max` numeric value with the upper bound of the space of the design. `grid.length` numeric value that gives the grid to evaluate the sensitivity function when looking for a maximum. `join_thresh` numeric value that states how close, in real units, two points must be in order to be joined together by the join heuristic. `delete_thresh` numeric value with the minimum weight, over 1 total, that a point needs to have in order to not be deleted from the design. `k` number of unknown parameters of the model. `delta_weights` numeric value in (0, 1), parameter of the algorithm. `tol` numeric value for the convergence of the weight optimizing algorithm. `tol2` numeric value for the stop condition of the algorithm.

## Value

list correspondent to the output of the correspondent algorithm called, dependent on the criterion. A list of two objects:

• optdes: a dataframe with the optimal design in two columns, `Point` and `Weight`.

• sens: a plot with the sensitivity function to check for optimality of the design.

Other cocktail algorithms: `DWFMult()`, `DsWFMult()`, `IWFMult()`