senslocallycomp {ICAOD} | R Documentation |
Verifying Optimality of The Locally DP-optimal Designs
Description
This function plot the sensitivity (derivative) function given an approximate (continuous) design and calculate the efficiency lower bound (ELB) for locally DP-optimal designs.
Let \boldsymbol{x}
belongs to \chi
that denotes the design space.
Based on the general equivalence theorem, generally, a design \xi^*
is optimal if and only if the value of its sensitivity (derivative) function
be non-positive for all \boldsymbol{x}
in \chi
and it only reaches zero
when \boldsymbol{x}
belong to the support of \xi^*
(be equal to one of the design point).
Therefore, the user can look at the sensitivity plot and the ELB to decide whether the
design is optimal or close enough to the true optimal design.
Usage
senslocallycomp(
formula,
predvars,
parvars,
alpha,
prob,
family = gaussian(),
x,
w,
lx,
ux,
inipars,
fimfunc = NULL,
sens.control = list(),
calculate_criterion = TRUE,
plot_3d = c("lattice", "rgl"),
plot_sens = TRUE,
npar = length(inipars),
silent = FALSE
)
Arguments
formula |
A linear or nonlinear model |
predvars |
A vector of characters. Denotes the predictors in the |
parvars |
A vector of characters. Denotes the unknown parameters in the |
alpha |
A value between 0 and 1.
Compound or combined DP-criterion is the product of the efficiencies of a design with respect to D- and average P- optimality, weighted by |
prob |
Either |
family |
A description of the response distribution and the link function to be used in the model.
This can be a family function, a call to a family function or a character string naming the family.
Every family function has a link argument allowing to specify the link function to be applied on the response variable.
If not specified, default links are used. For details see |
x |
Vector of the design (support) points. See 'Details' of |
w |
Vector of the corresponding design weights for |
lx |
Vector of lower bounds for the predictors. Should be in the same order as |
ux |
Vector of upper bounds for the predictors. Should be in the same order as |
inipars |
Vector of initial estimates for the unknown parameters.
It must match |
fimfunc |
A function. Returns the FIM as a |
sens.control |
Control Parameters for Calculating the ELB. For details, see |
calculate_criterion |
Calculate the optimality criterion? See 'Details' of |
plot_3d |
Which package should be used to plot the sensitivity (derivative) function for models with two predictors.
Either |
plot_sens |
Plot the sensitivity (derivative) function? Defaults to |
npar |
Number of model parameters. Used when |
silent |
Do not print anything? Defaults to |
Value
an object of class sensminimax
that is a list with the following elements:
type
Argument
type
that is required for print methods.optima
A
matrix
that stores all the local optima over the parameter space. The cost (criterion) values are stored in a column namedCriterion_Value
. The last column (Answering_Set
) shows if the optimum belongs to the answering set (1) or not (0). See 'Details' ofsens.minimax.control
. Only applicable for minimax or standardized maximin designs.mu
Probability measure on the answering set. Corresponds to the rows of
optima
for which the associated row in columnAnswering_Set
is equal to 1. Only applicable for minimax or standardized maximin designs.max_deriv
Global maximum of the sensitivity (derivative) function (
\epsilon
in 'Details').ELB
D-efficiency lower bound. Can not be larger than 1. If negative, see 'Note' in
sensminimax
orsens.minimax.control
.merge_tol
Merging tolerance to create the answering set from the set of all local optima. See 'Details' in
sens.minimax.control
. Only applicable for minimax or standardized maximin designs.crtval
Criterion value. Compare it with the column
Crtiterion_Value
inoptima
for minimax and standardized maximin designs.time
Used CPU time (rough approximation).
References
McGree, J. M., Eccleston, J. A., and Duffull, S. B. (2008). Compound optimal design criteria for nonlinear models. Journal of Biopharmaceutical Statistics, 18(4), 646-661.
Examples
p <- c(1, -2, 1, -1)
prior4.4 <- uniform(p -1.5, p + 1.5)
formula4.4 <- ~exp(b0+b1*x1+b2*x2+b3*x1*x2)/(1+exp(b0+b1*x1+b2*x2+b3*x1*x2))
prob4.4 <- ~1-1/(1+exp(b0 + b1 * x1 + b2 * x2 + b3 * x1 * x2))
predvars4.4 <- c("x1", "x2")
parvars4.4 <- c("b0", "b1", "b2", "b3")
lb <- c(-1, -1)
ub <- c(1, 1)
## That is the optimal design when alpha = .25, see ?locallycomp on how to find it
xopt <- c(-1, -0.389, 1, 0.802, -1, 1, -1, 1)
wopt <- c(0.198, 0.618, 0.084, 0.1)
# We want to verfiy the optimality of the optimal design by the general equivalence theorem.
senslocallycomp(formula = formula4.4, predvars = predvars4.4, parvars = parvars4.4,
family = binomial(), prob = prob4.4, lx = lb, ux = ub,
alpha = .25, inipars = p, x = xopt, w = wopt)
## Not run:
# is this design also optimal when alpha = .3
senslocallycomp(formula = formula4.4, predvars = predvars4.4, parvars = parvars4.4,
family = binomial(), prob = prob4.4, lx = lb, ux = ub,
alpha = .3, inipars = p, x = xopt, w = wopt)
# when alpha = .3
senslocallycomp(formula = formula4.4, predvars = predvars4.4, parvars = parvars4.4,
family = binomial(), prob = prob4.4, lx = lb, ux = ub,
alpha = .5, inipars = p, x = xopt, w = wopt)
# when alpha = .8
senslocallycomp(formula = formula4.4, predvars = predvars4.4, parvars = parvars4.4,
family = binomial(), prob = prob4.4, lx = lb, ux = ub,
alpha = .8, inipars = p, x = xopt, w = wopt)
# when alpha = .9
senslocallycomp(formula = formula4.4, predvars = predvars4.4, parvars = parvars4.4,
family = binomial(), prob = prob4.4, lx = lb, ux = ub,
alpha = .9, inipars = p, x = xopt, w = wopt)
## As can be seen, the design looses efficiency as alpha increases.
## End(Not run)