Learn R Programming

OptimalDesign (version 0.1)

od.AA: Optimal approximate size-constrained design

Description

Computes an optimal approximate design under the standard (size) constraint using a mixture of methods.

Usage

od.AA(F, N=1, crit="D", R=NULL, w1=NULL, alg="oom", lambda=0.9, tab=NULL, graph=NULL, eff=1-1e-09, 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. If N=1 the result will be in the standard form of a normalized (probability) measure representing proportions of trials in individual design points.
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 real vector of length n with non-negative components, representing the initial design. Before using, w1 is normalized. The information matrix of w1 must be nonsingular. The argument w1 can also be NULL; in that case the function generates a random initial design. Set all components of w1 to strictly positive numbers if you use multiplicative steps only.
alg
The methods ("d", "o", "m") in the order used within one iteration (see Details).
lambda
A real number in the interval (0,1) representing the parameter of the multiplicative algorithm used for computing A- and IV-optimal designs. Parameter lambda is ignored if crit="D".
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.
eff
The efficiency for the stopping rule in the interval (0,1). The algorithm will be stopped if a lower bound on the efficiency of the actual design is equal or greater than eff.
t.max
The time limit for the computation.

Value

A list with the following components:

Details

The function implements three algorithms for the computation of optimal approximate designs: the standard vertex-direction method ("d"), the standard multiplicative method ("m"), and a novel ordered vertex exchange method ("o"). The methods can be freely combined. For instance, setting method="doom" means that within each iteration the program will execute one vertex direction step, then two ordered vertex exchange steps, and then one multiplicative step. The justification of this approach is similar to that of Yu (2011); see the references. The information matrix of w1 should have the condition number of at least 1e-5. Even if no initial design is provided, the model should be non-singular in the sense that there exists an approximate 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 performance of the algorithms depends on the problem, on the choice of the parameters, and on the hardware used. However, if the method "o" is used at least once within each iteration, the function tends to reliably compute at least 99.9%-efficient approximate design for a problem with a ten thousand design points within seconds of computing time.

References

Yu Y (2011): "D-optimal designs via a cocktail algorithm", Statistics and Computing, Vol. 21, No. 4, pp. 475-481

See Also

od.SOCP, od.KL, od.RCs

Examples

Run this code
# Create the regressors matrix for the third-degree trigonometric model 
# on a "partial circle".
F.trig <- F.cube(~I(cos(x1)) + I(sin(x1)) + 
          I(cos(2 * x1)) + I(sin(2 * x1)) + 
          I(cos(3 * x1)) + I(sin(3 * x1)), 
          -pi/2, pi/2, 200)

# Compute the D-, A-, and IV-optimal standardized approximate designs.
res.trig.D <- od.AA(F.trig, 1, alg = "doom", crit = "D", 
              graph=1:7, t.max=4)
res.trig.A <- od.AA(F.trig, 1, alg = "doom", crit = "A", 
              graph=1:7, t.max=4)
res.trig.IV <- od.AA(F.trig, 1, alg = "doom", crit = "IV", 
               graph=1:7, t.max=4)

# Create a model with 2000 regressors generated from the 5 dimensional 
# multivariate normal distribution. (A random linear regression model 
# with 2000 design points and 5 parameters.)
F.norm <- matrix(rnorm(10000), ncol=5)

# Compute the D-, and A-optimal standardized approximate designs. 
res.norm.D <- od.AA(F.norm, 1, alg = "om", crit = "D", 
                    graph=1:5, t.max=4)
res.norm.A <- od.AA(F.norm, 1, alg = "om", crit = "A", 
                    graph=1:5, t.max=4)

Run the code above in your browser using DataLab