assess {acebayes} | R Documentation |
Compares two designs under the approximate expected utility
Description
Calculates approximations to the expected utility for two designs.
Usage
assess(d1, d2, ...)
## S3 method for class 'ace'
assess(d1, d2, B = NULL, n.assess = 20, relative = TRUE, ...)
## S3 method for class 'pace'
assess(d1, d2, B = NULL, n.assess = 20, relative = TRUE, ...)
Arguments
d1 , d2 |
|
B |
An optional argument for controlling the approximation to the expected utility (see |
n.assess |
If |
relative |
An optional argument, for when |
... |
Arguments to be passed to and from other methods. |
Details
In the case of when d1
was generated from a call to (p)ace
with argument deterministic = FALSE
or from a call to (p)aceglm
or (p)acenlm
with argument method
being "MC"
, n.assess
evaluations of the stochastic approximation to the expected utility will be calculated for each of the designs from d1
and d2
. Otherwise, one evaluation of the deterministic approximation to the expected utility will be calculated for each of the designs from d1
and d2
.
In the case when d1
was generated as a call to (p)aceglm
or (p)acenlm
with argument criterion
being "A"
, "D"
or "E"
, the relative D-, E-, or A-efficiency of the two designs will be calculated. The direction of the relative efficiency can be controlled by the relative
argument.
Value
The function will an object of class "assess"
which is a list with the following components:
U1 |
In the case of when |
U2 |
In the case of when |
eff |
In the case when |
d1 |
The argument |
d2 |
The argument |
Author(s)
Antony M. Overstall A.M.Overstall@soton.ac.uk, David C. Woods, Maria Adamou & Damianos Michaelides
See Also
ace
, pace
, aceglm
, acenlm
, paceglm
, pacenlm
.
Examples
## This example involves finding a Bayesian D-optimal design for a
## compartmental model with n = 18 runs. There are three parameters.
## Two parameters have uniform priors and the third has a prior
## point mass.
n <- 18
k <- 1
p <- 3
set.seed(1)
start.d <- randomLHS(n = n, k = k) * 24
colnames(start.d) <- c("t")
a1<-c(0.01884, 0.298)
a2<-c(0.09884, 8.298)
prior <- list(support = cbind(rbind(a1, a2), c(21.8, 21.8)))
colnames(prior[[1]]) <- c("theta1", "theta2", "theta3")
example <- acenlm(formula = ~ theta3 * (exp( - theta1 * t) - exp( - theta2 * t)),
start.d = start.d, prior = prior, lower = 0, upper = 24, N1 = 2, N2 = 0)
## Compute efficiency of final design compared to starting design.
assess(d1 = example, d2 = start.d)
## Should get
# Approximate expected utility of d1 = 15.40583
# Approximate expected utility of d2 = 11.26968
# Approximate relative D-efficiency = 396.9804%