Description Usage Arguments Details Value Author(s) References See Also Examples
Computes an optimal or nearly-optimal approximate or exact experimental design using mixed integer second-order cone programming.
1 2 3 |
Fx |
the |
b1,A1, b2,A2, b3,A3 |
the real vectors and matrices that define the constraints on permissible designs |
w0 |
a non-negative vector of length |
bin |
Should each design point be used at most once? |
type |
the type of the design. Permissible values are |
crit |
the optimality criterion. Possible values are |
h |
a non-zero vector of length |
gap |
the gap for the MISOCP solver to stop the computation. If |
t.max |
the time limit for the computation. |
echo |
Print the call of the function? |
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.
A list with the following components:
call |
the call of the function |
w.best |
the permissible design found, or |
supp |
the indices of the support of |
w.supp |
the weights of |
M.best |
the information matrix of |
Phi.best |
the value of the criterion of optimality of the design |
status |
the status variable of the gurobi optimization procedure; see the gurobi solver documentation for details |
t.act |
the actual time of the computation |
Radoslav Harman, Lenka Filova
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.