od_MISOCP: Optimal exact design using mixed integer second-order cone...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/od_MISOCP.R

Description

Computes an optimal or nearly-optimal approximate or exact experimental design using mixed integer second-order cone programming.

Usage

1
2
3
od_MISOCP(Fx, b1=NULL, A1=NULL, b2=NULL, A2=NULL, b3=NULL, A3=NULL, w0=NULL,
          bin=FALSE, type="exact", crit="D", h=NULL, gap=NULL,
          t.max=120, echo=TRUE)

Arguments

Fx

the n times m (where m>=2, m<=n) matrix containing all candidate regressors (as rows), i.e., n is the number of candidate design points, and m (where m>=2) is the number of parameters

b1,A1, b2,A2, b3,A3

the real vectors and matrices that define the constraints on permissible designs w as follows: A1 %*% w <= b1, A2 %*% w >= b2, A3 %*% w == b3. Each of the arguments can be NULL, but at least one of b1, b2, b3 must be non-NULL. If some bi is non-NULL and Ai is NULL, then Ai is set to be matrix(1, nrow =1, ncol = n).

w0

a non-negative vector of length n representing the design to be augmented (i.e., the function adds the constraint w >= w0 for permissible designs w). This argument can also be NULL; in that case, w0 is set to the vector of zeros.

bin

Should each design point be used at most once?

type

the type of the design. Permissible values are "approximate" and "exact".

crit

the optimality criterion. Possible values are "D", "A", "I", "C", "c".

h

a non-zero vector of length m corresponding to the coefficients of the linear parameter combination of interest. If crit is not "C" nor "c" then h is ignored. If crit is "C" or "c" and h=NULL then h is assumed to be c(0,...,0,1).

gap

the gap for the MISOCP solver to stop the computation. If NULL, the default gap is used. Setting gap=0 and t.max=Inf will ultimately provide the optimal exact design, but the computation may be extremely time consuming.

t.max

the time limit for the computation.

echo

Print the call of the function?

Details

At least one of b1, b2, b3 must be non-NULL. If bi is non-NULL and Ai is NULL for some i then Ai is set to be the vector of ones. If bi is NULL for some i then Ai is ignored.

Value

A list with the following components:

call

the call of the function

w.best

the permissible design found, or NULL. The value NULL indicates a failed computation

supp

the indices of the support of w.best

w.supp

the weights of w.best on the support

M.best

the information matrix of w.best or NULL if w.best is NULL

Phi.best

the value of the criterion of optimality of the design w.best. If w.best has a singular information matrix or if the computation fails, the value of Phi.best is 0

status

the status variable of the gurobi optimization procedure; see the gurobi solver documentation for details

t.act

the actual time of the computation

Author(s)

Radoslav Harman, Lenka Filova

References

Sagnol G, Harman R (2015): Computing exact D-optimal designs by mixed integer second order cone programming. The Annals of Statistics, Volume 43, Number 5, pp. 2198-2224.

See Also

od_KL, od_RC, od_AQUA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
# Compute an A-optimal block size two design
# for 6 treatments and 9 blocks

Fx <- Fx_blocks(6)
w <- od_MISOCP(Fx, b3 = 9, crit = "A", bin = TRUE)$w.best
des <- combn(6, 2)[, as.logical(w)]
print(des)

library(igraph)
grp <- graph_(t(des), from_edgelist(directed = FALSE))
plot(grp, layout=layout_with_graphopt)

# Compute a symmetrized D-optimal approximate design
# for the full quadratic model on a square grid
# with uniform marginal constraints

Fx <- Fx_cube(~x1 + x2 + I(x1^2) + I(x2^2) + I(x1*x2), n.levels = c(21, 21))
A3 <- matrix(0, nrow = 21, ncol = 21^2)
for(i in 1:21) A3[i, (i*21 - 20):(i*21)] <- 1
w <- od_MISOCP(Fx, b3 = rep(1, 21), A3 = A3, crit = "D", type = "approximate")$w.best
w.sym <- od_SYM(Fx, w, b3 = rep(1, 21), A3 = A3)$w.sym
od_plot(Fx, w.sym, Fx[, 2:3], dd.size = 2)

## End(Not run)

OptimalDesign documentation built on March 26, 2020, 9:35 p.m.