od_PUK: Efficient rounding of an approximate design

Description Usage Arguments Value Author(s) References Examples

View source: R/od_PUK.R

Description

Compute the classical efficient rounding of a non-normalized approximate design w such that the resulting exact design has size floor(sum(w)).

Usage

1
od_PUK(Fx, w, 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

w

the vector of non-negative real numbers of length n representing the design

echo

Print the call of the function?

Value

The rounded version of w

Author(s)

Radoslav Harman and Samuel Rosa

References

Pukelsheim F, Rieder S (1992) Efficient rounding of approximate designs. Biometrika, 79(4), 763–770.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Compute a D-optimal approximate design
# Round it using the efficient rounding to various sizes
# Visualize the designs

Fx <- Fx_cube(~x1 + I(x1^2) + I(x1^3), lower = 0, upper = 1, n.levels = 11)
w.app <- od_REX(Fx)$w.best
Phi.app <- optcrit(Fx, w.app)

w.ex10 <- od_PUK(Fx, 10*w.app)$w.round
w.ex20 <- od_PUK(Fx, 20*w.app)$w.round
w.ex30 <- od_PUK(Fx, 30*w.app)$w.round

par(mfrow = c(2, 2))
od_plot(Fx, w.app, main.lab = "Approximate")
od_plot(Fx, w.ex10, main.lab = paste("N=10, Eff:", round(optcrit(Fx, w.ex10)/Phi.app/10, 4)))
od_plot(Fx, w.ex20, main.lab = paste("N=20, Eff:", round(optcrit(Fx, w.ex20)/Phi.app/20, 4)))
od_plot(Fx, w.ex30, main.lab = paste("N=30, Eff:", round(optcrit(Fx, w.ex30)/Phi.app/30, 4)))
par(mfrow = c(1, 1))

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