Learn R Programming

OptimalDesign (version 1.0.1)

effbound: Lower bound on efficiency

Description

Computes a lower bound on the efficiency of a design w in the class of all approximate designs of the same size as w.

Usage

effbound(Fx, w, crit="D", h=NULL, echo=TRUE)

Value

A lower bound on the D-, A-, I-, c-, or C-efficiency of w in the class of all approximate designs of the same size as w at the set of candidate regressors given by Fx.

Arguments

Fx

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

w

a non-negative vector of length n representing the design.

crit

the criterion; possible values are "D", "A", "I", "C" and "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).

echo

Print the call of the function?

Author

Radoslav Harman, Lenka Filova

Details

The lower bounds are based on the standard methods of convex analysis. See the reference paper at http://www.iam.fmph.uniba.sk/design/ for mathematical details.

See Also

varfun, dirder

Examples

Run this code
# A lower bound on the D-efficiencies of the uniform designs
# for the quadratic regression on a line grid

Fx <- Fx_cube(~x1 + I(x1^2), n.levels = 101)
effbound(Fx, rep(1/101, 101))

# The precise value of the D-efficiency
# requires computing the D-optimal design:

w.opt <- od_REX(Fx)$w.best
optcrit(Fx, rep(1/101, 101)) / optcrit(Fx, w.opt)

if (FALSE) {
# Let us do this for polynomial regressions of various degrees:

n <- 101; d.max <- 10; x <- seq(-1, 1, length = n)
effs <- matrix(0, ncol = 2, nrow = d.max)
Fx <- matrix(1, ncol = 1, nrow = n)
for(d in 1:d.max) {
  Fx <- cbind(Fx, x^d)
  effs[d, 1] <- effbound(Fx, rep(1/n, n))
  w.opt <- od_REX(Fx)$w.best
  effs[d, 2] <- optcrit(Fx, rep(1/n, n)) / optcrit(Fx, w.opt)
}
print(effs)

# We see that the lower bound becomes more and more conservative
# compared to the real efficiency which actually increases with d.


# Compute a D-optimal design for the main effects model
# on a random subsample of a 6D cube

n <- 1000000; m <- 6
Fx <- cbind(1, matrix(runif(n*m), ncol = m))
w <- od_REX(Fx, eff = 0.99)$w.best
Fx <- od_DEL(Fx, w)$Fx.keep
w <- od_REX(Fx)$w.best

# Now we will compute a lower bound on efficiency of such design
# on the entire (continuous) cube:
Fx <- rbind(Fx, Fx_cube(~x1 + x2 + x3 + x4 + x5 + x6, lower = rep(0, 6)))
w <- c(w, rep(0, 2^6))
effbound(Fx, w)

# The real D-efficiency of w on the entire cube is
optcrit(Fx, w)/od_REX(Fx)$Phi.best
}

Run the code above in your browser using DataLab