Learn R Programming

OptimalDesign (version 0.1)

od.RCs: Efficient exact size-constrained design using the RC heuristic

Description

Computes an efficient exact design under standard (size) constraints using the RC heuristic.

Usage

od.RCs(F, N, w0=NULL, crit="D", R=NULL, w1=NULL, kappa=0, tab=NULL, graph=NULL, t.max=120)

Arguments

F
The n times m matrix of real numbers. The rows of F represent the m-dimensional regressors corresponding to n design points. It is assumed that n>=m>=2. Cf. od.m1 for models with 1-dimensional regressors.
N
The required size of the design, i.e., the sum of the components of the resulting design. It is assumed that N>=m.
w0
The n times 1 vector representing the design to be augmented. Design w0 must satisfy sum(w0)<=n-1< code="">. The argument w0 can also be NULL. In that case w0 is set to the vector of zeros.
crit
The optimality criterion. Possible values are "D", "A", "IV".
R
The region of summation for the IV-optimality criterion. The argument R must be a subvector of 1:n, or NULL. If R=NULL, the procedure uses R=1:n. Argument R is ignored if crit="D", or if crit="A".
w1
The n times 1 nonnegative vector representing the initial design. Design w1 must satisfy w0<=w1< code=""> and sum(w1)<=n< code="">. Argument w1 can also be NULL. In that case the procedure sets w1 to be w0.
kappa
A small non-negative perturbation parameter.
tab
A vector determining the regressor components to be printed with the resulting design. This argument should be a subvector of 1:n, or a subvector of colnames(F), or it can be NULL. If tab=NULL, the design is not printed.
graph
A vector determining the regressor components to be plotted with the resulting design. This argument should be a subvector of 1:n, or a subvector of colnames(F), or it can be NULL. If graph=NULL, the resulting design is not visualized.
t.max
The time limit for the computation.

Value

A list with the following components:

Details

This is a numerically more efficient implementation of the general algorithm od.RC for the case of the standard (size) constraint, which is a special case of the resource constraints. See the reference for details. The information matrix of w1 should preferably have the condition number of at least 1e-5. Note that the floor of an optimal approximate design of size N (computed using od.AA) is often a good initial design. Alternatively, the initial design can be the result of a different optimal design procedure, such as od.KL. In any case, the model should be non-singular in the sense that there exists an exact design w with a well conditioned information matrix. If this requirement is not satisfied, the computation may fail, or it may produce a deficient design.

If the criterion of IV-optimality is selected, the region R should be chosen such that the associated matrix L (see the help page of the function od.crit) is non-singular, preferably with a condition number of at least 1e-5. If this requirement is not satisfied, the computation may fail, or it may produce a deficient design. The perturbation parameter kappa can be used to add n*m iid random numbers from the uniform distribution in [-kappa,kappa] to the elements of F before the optimization is executed. This can be helpful for generating a random design from the potentially large set of optimal or nearly-optimal designs. However, the RC heuristic uses a tabu principle based on the criterion values of designs, therefore in some problems a nonzero kappa can be detrimental to the optimization process. The procedure always returns a permissible design, but in some cases, especially if t.max is too small, the resulting design can be inefficient. The performance depends on the problem and on the hardware used, but in most cases the function can compute a nearly-optimal exact design for a problem with a hundred design points within minutes of computing time. Because this is a heuristic method, we advise the user to verify the quality of the resulting design by comparing it to the result of an alternative method (such as od.KL) and/or by computing its efficiency relative to the corresponding optimal approximate design (computed using od.AA).

References

Harman R, Bachrata A, Filova L (2016): Heuristic construction of exact experimental designs under multiple resource constraints, Applied Stochastic Models in Business and Industry, Volume 32, pp. 3-17

See Also

od.RC, od.KL, od.AA

Examples

Run this code
# We will compute the D-optimal design for the block model with additive 
# effects of blocks and treatments. Suppose that we have 15 blocks of 
# size two and 10 treatments. The problem is equivalent to the problem 
# of D-optimality in the standard model with 45 design points, 15 trials, 
# and the matrix of regressors F.block computed as below 
# (see the reference for details).

k <- 0
T1 <- T2 <- rep(0,45)
F.aux <- matrix(0, nrow=45, ncol=10)
for(i in 1:9){
  for(j in (i + 1):10){
    k <- k + 1
    T1[k] <- i
    T2[k] <- j
    F.aux[k, i] <- 1
    F.aux[k, j] <- (-1)
  }
}
F.block <-  F.aux %*% eigen(matrix(1, ncol=10, nrow=10))$vectors[, 2:10]

# Compute the D-optimal exact design of size 15 using the RCs procedure.
res <- od.RCs(F.block, 15, crit = "D", t.max=2.5)
res$Phi.best

# Solve the same problem using the KL procedure to check the obtained 
# criterion value.
od.KL(F.block, 15, crit = "D", t.max=1.5)$Phi.best

# Display the treatments in the 15 blocks of the obtained design.
data.frame(T1=T1[as.logical(res$w.best)], T2=T2[as.logical(res$w.best)])

# Note that the concurrence graph of the design is the Petersen graph.

Run the code above in your browser using DataLab